/* -- MFV Add-On Dashboard Icons & Modal -- */

/* -- Modal overrides -- */
#mfv-addon-modal .modal-dialog {
    max-width: 720px;
    margin: 30px auto;
}
#mfv-addon-modal .sign-in-box {
    padding: 0;
}

/* Header */
.mfv-am-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--mfv-as-border, #e2e8f0);
}
.mfv-am-header h5 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}
.mfv-am-header .close {
    font-size: 24px;
    line-height: 1;
    opacity: 0.5;
    background: none;
    border: none;
    cursor: pointer;
}
.mfv-am-header .close:hover { opacity: 1; }

/* Body */
.mfv-am-body {
    padding: 20px 24px;
    max-height: 65vh;
    overflow-y: auto;
}

/* Loading spinner */
.mfv-am-loading {
    text-align: center;
    padding: 40px 0;
    color: var(--mfv-as-muted, #64748b);
    font-size: 14px;
}
.mfv-am-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--mfv-as-border, #e2e8f0);
    border-top-color: var(--mfv-as-purple, #7B35D8);
    border-radius: 50%;
    animation: mfv-spin 0.6s linear infinite;
    margin: 0 auto 10px;
}
@keyframes mfv-spin { to { transform: rotate(360deg); } }

/* Empty state */
.mfv-am-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--mfv-as-muted, #64748b);
    font-size: 14px;
}

/* Active bar */
.mfv-am-active-bar {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 16px;
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.mfv-am-active-bar strong {
    font-weight: 700;
    margin-right: 4px;
}
.mfv-am-active-chip {
    background: #ccfbf1;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mfv-as-teal, #0e7490);
}

/* Section headers inside modal */
.mfv-am-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mfv-as-muted, #64748b);
    margin: 18px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--mfv-as-border, #e2e8f0);
}
.mfv-am-section-title:first-child { margin-top: 0; }

/* Add-on card grid */
.mfv-am-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Individual add-on card (horizontal layout) */
.mfv-am-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid var(--mfv-as-border, #e2e8f0);
    border-radius: 10px;
    padding: 14px 16px;
    position: relative;
    transition: border-color 0.15s;
}
.mfv-am-card:hover { border-color: var(--mfv-as-purple, #7B35D8); }

/* States */
.mfv-am-card--active {
    border-color: var(--mfv-as-teal, #0e7490);
    background: #f0fdfa;
}
.mfv-am-card--active:hover { border-color: var(--mfv-as-teal, #0e7490); }
.mfv-am-card--in-cart {
    border-color: var(--mfv-as-purple, #7B35D8);
    border-style: dashed;
    background: #faf5ff;
}
.mfv-am-card--locked {
    opacity: 0.6;
}

/* Card icon */
.mfv-am-card-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mfv-am-card-icon svg {
    width: 24px;
    height: 24px;
}

/* Card body */
.mfv-am-card-body {
    flex: 1;
    min-width: 0;
}
.mfv-am-card-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--mfv-as-text, #1e293b);
}
.mfv-am-card-desc {
    font-size: 12px;
    color: var(--mfv-as-muted, #64748b);
    line-height: 1.4;
    margin: 0;
}

/* Card badge */
.mfv-am-card-badge {
    position: absolute;
    top: -7px;
    right: 12px;
    background: var(--mfv-as-orange, #F5842A);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
    text-transform: uppercase;
}

/* Card right side (price + button) */
.mfv-am-card-action {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.mfv-am-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--mfv-as-purple, #7B35D8);
    white-space: nowrap;
}
.mfv-am-card-price small {
    font-size: 11px;
    font-weight: 400;
    color: var(--mfv-as-muted, #64748b);
}
.mfv-am-card-dur {
    font-size: 10px;
    color: var(--mfv-as-muted, #64748b);
}

/* Add to cart button */
.mfv-am-add-btn {
    padding: 6px 14px;
    border-radius: 7px;
    background: var(--mfv-as-purple, #7B35D8);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.12s;
    white-space: nowrap;
}
.mfv-am-add-btn:hover { opacity: 0.88; }
.mfv-am-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.mfv-am-add-btn--added {
    background: var(--mfv-as-teal, #0e7490);
    cursor: default;
}
.mfv-am-add-btn--added:hover { opacity: 1; }

/* Active / Locked labels */
.mfv-am-status-active {
    font-size: 12px;
    font-weight: 700;
    color: var(--mfv-as-teal, #0e7490);
}
.mfv-am-status-locked {
    font-size: 11px;
    color: var(--mfv-as-muted, #64748b);
}

/* Error message */
.mfv-am-card-error {
    font-size: 11px;
    color: var(--mfv-error);
    margin-top: 2px;
}

/* Cart bar at bottom */
.mfv-am-cart-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-top: 1px solid var(--mfv-as-border, #e2e8f0);
    background: var(--mfv-as-bg, #f8fafc);
    border-radius: 0 0 4px 4px;
}
.mfv-am-cart-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--mfv-as-text, #1e293b);
}
.mfv-am-checkout-btn {
    padding: 8px 20px;
    border-radius: 8px;
    background: var(--mfv-as-purple, #7B35D8);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.12s;
}
.mfv-am-checkout-btn:hover { opacity: 0.88; color: #fff !important; }

/* -- CTA Banner -- */
.mfv-cta-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #faf5ff 0%, #f0fdfa 100%);
    border: 1.5px solid #e9d5ff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    animation: mfv-banner-fade-in 0.5s ease-out;
}
@keyframes mfv-banner-fade-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mfv-cta-banner__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--mfv-as-purple, #7B35D8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    animation: mfv-icon-pulse 2s ease-in-out infinite;
}
@keyframes mfv-icon-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--mfv-secondary-alt-rgb, 123, 53, 216), 0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(var(--mfv-secondary-alt-rgb, 123, 53, 216), 0); }
}
.mfv-cta-banner__text {
    font-size: 14px;
    color: var(--mfv-as-text, #1e293b);
    line-height: 1.5;
}
.mfv-cta-banner__text strong {
    color: var(--mfv-as-purple, #7B35D8);
}

/* -- Grouped add-on icons block on listing cards -- */
.mfv-addon-group-wrap {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    list-style: none;
}
.mfv-addon-group {
    position: relative;
    background: linear-gradient(135deg, #f0fdfa 0%, #f0f9ff 100%);
    border: 1.5px solid #e0f2fe;
    border-radius: 12px;
    padding: 4px 10px 10px;
}
.mfv-addon-group__label {
    position: absolute;
    top: -9px;
    right: 12px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--mfv-accent);
    padding: 2px 10px;
    border-radius: 20px;
    line-height: 1.5;
    z-index: 1;
}
.mfv-addon-group__icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.mfv-addon-group__icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 5px 4px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.15s;
    cursor: pointer;
}
.mfv-addon-group__icon:hover {
    background: rgba(255,255,255,0.7);
}
.mfv-addon-group__icon-label {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    line-height: 1.2;
}

/* Icon glyphs via Material Icons */
.mfv-addon-group__icon-glyph {
    font-family: 'Material Icons' !important;
    font-weight: 400;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}
.mfv-agi-promoted::before   { content: "\e8b6"; color: var(--mfv-secondary-alt); }
.mfv-agi-featured::before   { content: "\e838"; color: #eab308; }
.mfv-agi-website::before    { content: "\e894"; color: var(--mfv-primary); }
.mfv-agi-booking::before    { content: "\e916"; color: #2563eb; }
.mfv-agi-newsletter::before { content: "\e0be"; color: var(--mfv-secondary-alt); }
.mfv-agi-sms::before        { content: "\e625"; color: var(--mfv-success); }
.mfv-agi-all::before        { content: "\e5c3"; color: var(--mfv-accent); }

/* -- My Listings search/filter bar layout -- */
.row.my-listings-tab-con {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-bottom: 20px;
}
.row.my-listings-tab-con > .mlduo-welcome-message {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-bottom: 6px;
}
.row.my-listings-tab-con > .search-my-listings {
    flex: 0 0 auto !important;
    max-width: none !important;
    width: 280px !important;
    min-width: 0;
}
.row.my-listings-tab-con > .sort-my-listings {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 140px;
}
.row.my-listings-tab-con > .search-my-listings form {
    width: 100%;
}
.row.my-listings-tab-con > .search-my-listings form input[type="text"] {
    width: 100%;
}
.row.my-listings-tab-con > .sort-my-listings select {
    width: 100%;
    min-width: 140px;
    height: 38px;
    padding: 6px 10px;
    border: 1.5px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}
.row.my-listings-tab-con > .sort-my-listings select:focus {
    border-color: var(--mfv-as-teal, #0e7490);
    outline: none;
}

/* Stat box text color */
.my-listings-stat-box .mlduo-stat-box h2,
.my-listings-stat-box .mlduo-stat-box p {
    color: #fff !important;
}

/* Listing type badge */
td.l-type .listing-type .value {
    background: var(--mfv-primary) !important;
    color: #fff !important;
}

/* -- Responsive -- */
@media (max-width: 640px) {
    #mfv-addon-modal .modal-dialog {
        margin: 10px;
        max-width: none;
    }
    .mfv-am-body {
        padding: 14px 16px;
        max-height: 70vh;
    }
    .mfv-am-card {
        flex-wrap: wrap;
        gap: 10px;
    }
    .mfv-am-card-action {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-top: 1px solid var(--mfv-as-border, #e2e8f0);
        padding-top: 10px;
    }
}
