/**
 * Public styles for the Product Configurator.
 *
 * @since      1.0.0
 */

/* Main container */
.product-configurator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.configurator-step {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.configurator-step-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Configuration tabs */
.configurator-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    border-bottom: 1px solid #ddd;
}

.configurator-tabs li {
    padding: 10px 15px;
    cursor: pointer;
    margin-right: 5px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    background-color: #f5f5f5;
}

.configurator-tabs li.active {
    background-color: #fff;
    border-color: #ddd;
    border-bottom-color: #fff;
    margin-bottom: -1px;
    font-weight: bold;
}

/* Configuration panels */
.configurator-panel {
    display: none;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

/* Options layout */
.option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.option-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    width: calc(33.333% - 15px);
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option-item:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.option-item.selected {
    border-color: #2271b1;
    background-color: #f0f7ff;
}

.option-image {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    max-height: 150px;
    object-fit: contain;
}

.option-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.option-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Product preview */
.product-preview-container {
    position: sticky;
    top: 20px;
    margin-bottom: 20px;
}

.product-preview {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.product-preview-inner {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.preview-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
}

/* Configuration summary */
.configuration-summary {
    margin-top: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.configuration-summary ul {
    margin: 0;
    padding: 0 0 0 20px;
}

.configuration-summary li {
    margin-bottom: 5px;
}

/* Navigation buttons */
.configurator-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.configurator-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.configurator-btn:hover {
    background-color: #135e96;
    color: #fff;
}

.configurator-btn.prev {
    background-color: #f0f0f1;
    color: #2c3338;
}

.configurator-btn.prev:hover {
    background-color: #dcdcde;
    color: #2c3338;
}

.configurator-btn:disabled {
    background-color: #dcdcde;
    color: #8c8f94;
    cursor: not-allowed;
}

/* Cord position step */
.cord-position-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.cord-position-image {
    position: relative;
    width: 300px;
    height: 300px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
}

.cord-positions {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.cord-position-option {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cord-position-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(34, 113, 177, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: bold;
}

.cord-position-marker.A {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.cord-position-marker.B {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.cord-position-marker.C {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.cord-position-marker.D {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Terms and conditions */
.terms-container {
    margin-bottom: 20px;
}

.terms-text {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    margin-bottom: 15px;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.terms-checkbox input {
    margin-right: 10px;
}

/* Customer info form */
.customer-info-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-row textarea {
    height: 100px;
}

.required-field::after {
    content: ' *';
    color: #d63638;
}

/* Success message */
.order-success {
    text-align: center;
    padding: 30px;
}

.order-success h2 {
    color: #00a32a;
    margin-bottom: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .option-item {
        width: calc(50% - 15px);
    }
    
    .configurator-tabs {
        flex-wrap: wrap;
    }
    
    .configurator-tabs li {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .option-item {
        width: 100%;
    }
    
    .cord-positions {
        flex-wrap: wrap;
    }
}
