.cs-size-chart-table {
    width: 100%;
    border-collapse: collapse;
}

.cs-size-chart-table th,
.cs-size-chart-table td {
    border: 1px solid #ddd;
    padding: 8px;
}

.cs-size-chart-table th {
    background-color: #f2f2f2;
}

.cs-size-chart-trigger {
    cursor: pointer;
    text-decoration: underline;
}

/* Global box-sizing */
* {
    box-sizing: border-box;
}

/* Modal Styles - Modern Premium Design */
.cs-sc-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cs-sc-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 90%;
    max-height: 90vh;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation-name: cs-animatetop;
    animation-duration: 0.4s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Specific modal widths for different modals */
.cs-sc-modal-content,
.cs-sc-modal-content-narrow {
    max-width: 680px;
}

.cs-sc-modal-content h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    margin: 0;
    padding: 20px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.cs-sc-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

div#cs-quiz-step-0 {
    margin-bottom: 50px;
}

@keyframes cs-animatetop {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cs-sc-close,
.cs-sc-close-calc {
    color: rgba(255, 255, 255, 0.9);
    float: right;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-sc-close:hover,
.cs-sc-close:focus,
.cs-sc-close-calc:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Floating Button - Premium */
.cs-size-chart-floating-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 28px;
    border-radius: 50px;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-size-chart-floating-trigger:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.cs-size-chart-floating-trigger .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Quiz Styles - Modern & Clean */
.cs-quiz-step {
    margin: 0;
    padding: 0;
}

.cs-quiz-step h3 {
    margin: 0 0 24px 0;
    color: #2d3748;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}

.cs-quiz-step label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-quiz-step input[type="number"],
.cs-quiz-step select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
}

.cs-quiz-step label:has(input[type="radio"]) {
    display: block;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    text-transform: none;
    font-weight: 500;
    font-size: 15px;
    position: relative;
}

.cs-quiz-step label:has(input[type="radio"]):hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.cs-quiz-step input[type="radio"]:checked+label,
.cs-quiz-step label:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    font-weight: 600;
}

/* Buttons - Modern Gradient */
.cs-quiz-next,
.cs-quiz-prev,
#cs-calc-submit,
#cs-photo-analyze,
#cs-photo-skip {
    padding: 14px 28px !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-quiz-next,
#cs-calc-submit,
#cs-photo-analyze {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.cs-quiz-next:hover,
#cs-calc-submit:hover,
#cs-photo-analyze:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.cs-quiz-prev,
#cs-photo-skip {
    background: #fff !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
    margin-right: 12px;
}

.cs-quiz-prev:hover,
#cs-photo-skip:hover {
    background: #f7fafc !important;
    transform: translateY(-2px) !important;
}

/* Result Display - Premium Card */
#cs-calc-result {
    display: none;
    text-align: center;
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

/* Photo Upload Styles - Premium */
.cs-photo-upload-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border: 2px solid #ffc107;
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
}

.cs-photo-upload-notice p {
    margin: 8px 0;
    color: #856404;
    font-size: 14px;
}

.cs-photo-upload-tips {
    background: linear-gradient(135deg, #e7f3ff 0%, #d4e9ff 100%);
    border: 2px solid #2196f3;
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
}

.cs-photo-upload-tips p {
    color: #0c5aa6;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

.cs-photo-upload-tips ul {
    margin: 8px 0 0 0px;
    color: #0c5aa6;
    font-size: 14px;
}

.cs-photo-upload-area {
    margin: 24px 0;
}

.cs-dropzone {
    border: 3px dashed #cbd5e0;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

.cs-dropzone p {
    margin: 8px 0;
    color: #4a5568;
    font-weight: 500;
}

.cs-dropzone:hover,
.cs-dropzone.dragover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    transform: scale(1.02);
}

.cs-file-info {
    font-size: 13px;
    color: #718096;
    margin-top: 8px;
}

#cs-photo-preview {
    text-align: center;
    padding: 24px;
}

#cs-photo-preview-img {
    max-width: 240px;
    max-height: 240px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

#cs-photo-processing {
    text-align: center;
    padding: 32px;
    font-size: 18px;
    color: #4a5568;
    font-weight: 600;
}

#cs-photo-error {
    display: none;
    color: #c53030;
    padding: 16px;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-radius: 12px;
    margin-top: 16px;
    border: 2px solid #ef5350;
}

/* Hidden elements */
.cs-hidden {
    display: none;
}

/* Full width inputs */
.cs-full-width {
    width: 100%;
}

/* Confidence display in JS-generated content */
.cs-confidence-text {
    font-size: 0.9em;
    color: #c5c5c5;
}

/* Form Validation Error States */
.cs-quiz-step input.error,
.cs-quiz-step select.error {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
}

.cs-quiz-step input.error:focus,
.cs-quiz-step select.error:focus {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2) !important;
}

/* Error Message Display */
.cs-error-message {
    color: #e53e3e;
    font-size: 13px;
    margin-top: -15px;
    margin-bottom: 15px;
    padding-left: 2px;
    display: block;
    font-weight: 500;
    animation: cs-error-fade-in 0.3s ease;
}

@keyframes cs-error-fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .cs-sc-modal-content {
        width: 95%;
        margin: 10% auto;
        border-radius: 16px;
    }

    .cs-sc-modal-content h2 {
        font-size: 24px;
        padding: 24px 20px;
    }

    .cs-sc-modal-body {
        padding: 20px;
    }

    .cs-quiz-step h3 {
        font-size: 20px;
    }
}