/* Customization Modal Styles */
#customization-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

#customization-modal {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 1100px;
    height: 90vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.customization-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #e5e5e5;
}

.customization-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.customization-modal-close {
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
}

.customization-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative; /* For positioning pages */
}

/* --- Segmented Control --- */
.segmented-control {
    display: flex;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.segmented-control-btn {
    flex: 1;
    padding: 12px 10px;
    border: none;
    background-color: #f9f9f9;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    transition: background-color 0.2s, color 0.2s;
    border-right: 1px solid #ddd;
}

.segmented-control-btn:last-child {
    border-right: none;
}

.segmented-control-btn.active {
    background-color: var(--shein-red, #E23939);
    color: white;
}

.segmented-control-btn:not(.active):hover {
    background-color: #f0f0f0;
}

.customization-preview {
    flex: 1;
    padding: 20px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 1px solid #e5e5e5;
}

#customization-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 1px dashed #ccc;
}

.customization-options {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.customization-options .option-group {
    margin-bottom: 20px;
}

.customization-options label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}

.customization-options input[type="text"],
.customization-options select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.customization-options .radio-group {
    display: flex;
    gap: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.customization-options .radio-group label {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    margin: 0;
    font-size: 14px;
}

.customization-options .radio-group input[type="radio"] {
    display: none;
}

.customization-options .radio-group input[type="radio"]:checked + label {
    background-color: var(--shein-red, #E23939);
    color: white;
}

.customization-options .upload-area {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    background-color: #fafafa;
}

.customization-options .upload-area:hover {
    border-color: var(--shein-red, #E23939);
}

.upload-area p {
    margin: 0;
    font-size: 14px;
    color: #888;
}

.upload-area #customization-preview-image {
    max-width: 100px;
    max-height: 100px;
    margin-top: 10px;
    display: none;
}

.customization-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: #f9f9f9;
}

.customization-price {
    margin-right: auto;
    font-size: 18px;
}

.customization-price span {
    font-weight: bold;
    color: var(--shein-red, #E23939);
}

.customization-modal-footer .btn-add-to-cart {
    background-color: var(--shein-red, #E23939);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.customization-modal-footer .btn-add-to-cart:hover {
    opacity: 0.9;
}

.customization-modal-footer .btn-add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#customization-modal .info-text {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* --- Chooser Page Styles (REMOVED) --- */

/* --- Editor Page Styles (REMOVED) --- */

#customization-editor {
    display: flex;
    width: 100%;
    height: 100%;
}

.editor-header {
    margin-bottom: 15px;
}

#customization-back-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    padding: 5px;
}

#customization-back-btn:hover {
    color: #000;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    #customization-modal {
        width: 95%;
        height: 95vh;
        max-height: none;
        flex-direction: column;
    }

    .customization-modal-body {
        flex-direction: column;
        overflow-y: auto;
    }

    .customization-preview {
        flex: 1 1 auto; /* Allow preview to shrink but also grow */
        min-height: 250px; /* Ensure a minimum height for the preview */
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        padding: 10px;
    }

    .customization-options {
        flex: 1 1 auto; /* Allow options to shrink and grow */
        padding: 15px;
        overflow-y: visible; /* Let the body scroll */
    }

    .customization-modal-header h2 {
        font-size: 18px;
    }

    .customization-modal-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    .customization-price {
        margin-right: 0;
        margin-bottom: 10px;
        text-align: center;
    }

    .customization-modal-footer .btn-add-to-cart {
        width: 100%;
        padding: 15px;
    }

    .segmented-control-btn {
        font-size: 13px;
        padding: 10px 5px;
    }
} 