/**
 * FurryNestLab Module X1:
 * PDP Interactive Breed & Size Recommender Engine Styles
 */

/* 1. PDP Trigger Bar */
.fnl-breed-size-trigger-bar {
    margin: 14px 0 16px 0;
    width: 100%;
}

.fnl-breed-size-open-btn {
    display: flex;
    align-items: center;
    width: 100%;
    background: #f0fdfa;
    border: 1.5px dashed #0d9488;
    border-radius: 12px;
    padding: 10px 16px;
    color: #0f766e;
    font-family: var(--font-body, 'DM Sans', -apple-system, sans-serif);
    cursor: pointer;
    outline: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.08);
    box-sizing: border-box;
}

.fnl-breed-size-open-btn:hover {
    background: #ccfbf1;
    border-color: #0f766e;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(13, 148, 136, 0.16);
}

.fnl-trigger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #0d9488;
    color: #ffffff;
    margin-right: 12px;
    flex-shrink: 0;
}

.fnl-trigger-icon svg {
    width: 18px;
    height: 18px;
}

.fnl-trigger-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    font-size: 13px;
    line-height: 1.35;
}

.fnl-trigger-text strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
}

.fnl-trigger-sub {
    color: #0d9488;
    font-size: 12px;
    font-weight: 600;
}

.fnl-trigger-arrow {
    font-size: 18px;
    font-weight: 700;
    color: #0d9488;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.fnl-breed-size-open-btn:hover .fnl-trigger-arrow {
    transform: translateX(3px);
}

/* 2. Modal Overlay & Dialog Container */
.fnl-breed-size-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fnl-breed-size-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.fnl-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.fnl-modal-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 18px;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28);
    transform: translateY(18px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-body, 'DM Sans', -apple-system, sans-serif);
    padding: 24px;
    box-sizing: border-box;
}

.fnl-breed-size-modal.is-open .fnl-modal-card {
    transform: translateY(0) scale(1);
}

/* 3. Modal Header */
.fnl-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.fnl-modal-badge {
    display: inline-block;
    background: #ccfbf1;
    color: #0f766e;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 9999px;
    margin-bottom: 6px;
}

.fnl-modal-heading {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.fnl-modal-close-btn {
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 32px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.fnl-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* 4. Tab Navigation */
.fnl-recommender-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 4px;
}

.fnl-tab-btn {
    flex: 1;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fnl-tab-btn.is-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 5. Tab Body & Controls */
.fnl-tab-pane {
    display: none;
}

.fnl-tab-pane.is-active {
    display: block;
}

.fnl-pet-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.fnl-type-radio {
    flex: 1;
    cursor: pointer;
}

.fnl-type-radio input {
    display: none;
}

.fnl-radio-box {
    display: block;
    text-align: center;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    transition: all 0.2s ease;
}

.fnl-type-radio.is-selected .fnl-radio-box {
    background: #f0fdfa;
    border-color: #0d9488;
    color: #0f766e;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.fnl-field-group {
    margin-bottom: 18px;
}

.fnl-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.fnl-select-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.fnl-select-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Weight Slider */
.fnl-weight-slider-wrap {
    margin-bottom: 18px;
}

.fnl-weight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.fnl-weight-val-display {
    font-size: 15px;
    color: #0d9488;
    font-weight: 700;
}

.fnl-slider-input {
    width: 100%;
    accent-color: #0d9488;
    cursor: pointer;
    margin: 8px 0;
}

.fnl-slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
}

/* 6. Result Card */
.fnl-recommender-result-card {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
    border: 1.5px solid #14b8a6;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 18px;
    gap: 16px;
}

.fnl-result-badge-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0d9488;
    color: #ffffff;
    border-radius: 12px;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.fnl-result-sub {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.fnl-result-size-letter {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    margin-top: 2px;
}

.fnl-result-details-col {
    flex-grow: 1;
}

.fnl-result-breed-title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.fnl-result-specs {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
}

.fnl-match-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #0d9488;
}

/* 7. Action Button */
.fnl-apply-size-cta-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.fnl-apply-size-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(13, 148, 136, 0.45);
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.fnl-apply-size-cta-btn:active {
    transform: scale(0.98);
}

/* 8. Measuring Accordion & Guarantee */
.fnl-measuring-guide-accordion {
    margin-bottom: 14px;
}

.fnl-guide-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
}

.fnl-guide-summary {
    cursor: pointer;
    font-weight: 600;
    color: #334155;
    outline: none;
}

.fnl-guide-body {
    margin-top: 10px;
    color: #64748b;
    line-height: 1.5;
}

.fnl-guide-body ul {
    margin: 0;
    padding-left: 18px;
}

.fnl-guide-body li {
    margin-bottom: 4px;
}

.fnl-size-guarantee-strip {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 12px;
    line-height: 1.4;
    padding: 10px 14px;
    border-radius: 10px;
    text-align: center;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .fnl-modal-card {
        padding: 18px;
        max-height: 94vh;
    }
    .fnl-recommender-result-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .fnl-result-badge-col {
        width: 64px;
        height: 64px;
    }
    .fnl-result-size-letter {
        font-size: 26px;
    }
}
