/* xclothingfitting styles - v4 */
#xclothingfitting-upload-area {
    padding: 20px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    background: #f9f9f9;
}

#xclothingfitting-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

.xclothingfitting-button-container {
    margin: 15px 0;
}

.xcf-size-choices {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px !important;
}

.xcf-size-choices .btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 17px 10px !important;
    border: 2px solid #e2cccc !important;
    border-radius: 16px !important;
    background: #fffafa !important;
    color: #5a3a3a !important;
    font-size: 1.12rem !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    box-shadow: 0 4px 12px rgba(90, 58, 58, 0.08) !important;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.xcf-size-choices .btn:hover,
.xcf-size-choices .btn:focus {
    border-color: #a87979 !important;
    transform: translateY(-2px);
}

.xcf-size-choices .btn.active {
    border-color: #5a3a3a !important;
    background: #5a3a3a !important;
    color: #fff !important;
    box-shadow: 0 7px 16px rgba(90, 58, 58, 0.25) !important;
}

.xcf-height-slider {
    flex: 1;
    height: 14px !important;
    border: 0 !important;
    border-radius: 999px;
    background: #ead9d9 !important;
    outline: none !important;
    cursor: pointer;
    accent-color: #5a3a3a !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.xcf-height-slider::-webkit-slider-runnable-track {
    height: 14px;
    border-radius: 999px;
    background: #ead9d9;
}

.xcf-height-slider::-moz-range-track {
    height: 14px;
    border-radius: 999px;
    background: #ead9d9;
}

.xcf-height-slider::-webkit-slider-thumb {
    width: 32px;
    height: 32px;
    margin-top: -9px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #5a3a3a;
    box-shadow: 0 2px 8px rgba(90, 58, 58, 0.35);
    cursor: pointer;
    -webkit-appearance: none;
}

.xcf-height-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #5a3a3a;
    box-shadow: 0 2px 8px rgba(90, 58, 58, 0.35);
    cursor: pointer;
}

.xcf-morphology-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    max-width: 720px;
    margin: 0 auto;
}

.xcf-morphology-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px 8px 14px !important;
    overflow: hidden;
    border: 2px solid #eadada !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: #5a3a3a !important;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.xcf-morphology-card:hover,
.xcf-morphology-card:focus {
    border-color: #b99191;
    box-shadow: 0 6px 16px rgba(90, 58, 58, 0.14);
    transform: translateY(-2px);
    outline: none;
}

.xcf-morphology-card.active {
    border-color: #5a3a3a !important;
    box-shadow: 0 0 0 2px rgba(90, 58, 58, 0.12), 0 8px 20px rgba(90, 58, 58, 0.18) !important;
    background: #fbf8f8 !important;
}

.xcf-morphology-card img {
    width: 100%;
    aspect-ratio: 1 / 1.18;
    margin-bottom: 10px;
    border-radius: 9px;
    object-fit: cover;
    object-position: top;
}

.xcf-morphology-card strong {
    margin-bottom: 4px;
    color: #5a3a3a;
    font-size: 1rem;
}

.xcf-morphology-card span {
    color: #777;
    font-size: 0.78rem;
    line-height: 1.35;
}

.xcf-back-button {
    display: flex !important;
    align-items: center;
    width: max-content !important;
    margin: 0 0 22px !important;
    padding: 8px 12px !important;
    border: 1px solid #e2d2d2 !important;
    border-radius: 20px !important;
    background: #fbf8f8 !important;
    color: #5a3a3a !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer;
}

@media (max-width: 767px) {
    .xcf-size-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px !important;
    }

    .xcf-size-choices .btn {
        padding: 18px 8px !important;
        border-radius: 15px !important;
        font-size: 1.18rem !important;
    }

    .xcf-morphology-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .xcf-morphology-card {
        padding: 6px 6px 12px !important;
        border-radius: 14px !important;
    }

    .xcf-morphology-card strong {
        font-size: 0.95rem;
    }

    .xcf-morphology-card span {
        font-size: 0.72rem;
    }

    .xcf-back-button {
        margin-bottom: 16px !important;
    }
}

@keyframes xclothingfitting-scan {
    0% {
        top: -10%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 110%;
        opacity: 0;
    }
}

.xclothingfitting-scanner-line {
    animation: xclothingfitting-scan 2s linear infinite;
}