/* --- Modal Body Scroll Lock --- */
.modal-open {
    overflow: hidden !important;
}
/* --- IncentiveType Badge Colors --- */
.bg-orange-100 { background-color: #FFEDD5 !important; }
.text-orange-800 { color: #9A3412 !important; }
.bg-purple-100 { background-color: #F3E8FF !important; }
.text-purple-800 { color: #6D28D9 !important; }
.bg-blue-100 { background-color: #DBEAFE !important; }
.text-blue-800 { color: #1E40AF !important; }
.bg-green-100 { background-color: #DCFCE7 !important; }
.text-green-800 { color: #166534 !important; }
.bg-red-100 { background-color: #FEE2E2 !important; }
.text-red-800 { color: #991B1B !important; }
.bg-gray-100 { background-color: #F3F4F6 !important; }
.text-gray-800 { color: #1F2937 !important; }
.page-container {
    min-height: 100vh;
}

.text-center {
    text-align: center;
}

/* --- Buttons --- */
.button-primary {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    color: white;
}

.button-primary:hover {
    background-color: var(--daikin-dark-navy);
}

.button-primary.hero-button {background: none;}

.button-primary.button-small {
    height: 2rem;
    font-size: .75rem;
    padding: 0.25rem 0.75rem;
}

.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: rgb(17 24 39 / var(--tw-text-opacity, 1));
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 3rem;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    cursor: pointer;
    --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
    --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    --tw-backdrop-blur: blur(4px);
    -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
    /* backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); */
}

.button-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: transparent;
    color: var(--daikin-blue);
    border: 1px solid var(--daikin-blue);
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    cursor: pointer;
}

.help-buttons .button {
    font-size: .875rem;
    line-height: 1.25rem;
    padding: 0.5rem 2rem;
}

.help-buttons .button.button-outline {
    background: var(--white);
}

.help-buttons .button.button-outline:hover {
    background-color: var(--daikin-blue);
}

.button-text {
    color: var(--daikin-blue);
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.button-text:hover {
    color: var(--blue-800);
}

.button-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

.button-icon-sm {
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.25rem;
}


/* --- Hero Section --- */
.rebate-hero {
    padding: 12rem 0 5rem;
    /* Adjusted padding after removing header */
    background-color: var(--slate-950);
    color: white;
}

.hero-title {
    font-size: 2.25rem;
    /* text-4xl */
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    /* text-xl */
    color: var(--slate-300);
    margin-bottom: 2rem;
}

/* --- Search Section --- */
.rebate-search {
    padding: 5rem 0;
    background-image: url(/images/default-source/rebates---offers/rebates_bg.png);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.search-header {
    text-align: center;
    margin-bottom: 3rem;
}

.search-title {
    font-size: 1.875rem;
    /* text-3xl */
    font-weight: 700;
    color: rgb(17 24 39 / var(--tw-text-opacity, 1));
    margin-bottom: 1rem;
}

.filter-box {
    border-radius: 1rem;
    /* rounded-2xl */
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 8px 32px;
}

.filter-controls {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.main-filter-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-search-bar {
    position: relative;
    flex-grow: 1;
}

.main-search-input {
    width: 100%;
    height: 3rem;
    padding-left: 2.5rem;
    font-size: 1.125rem;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

.filter-panel {
    display: none;
    /* Hidden by default, toggled by JS */
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.filter-panel.is-open {
    display: grid;
}

.filter-toggle-button .chevron-icon {
    transition: transform 0.3s;
}

.filter-toggle-button.is-open .chevron-icon {
    transform: rotate(180deg);
}

.chevron-icon {
    width: 1rem;
    height: 1rem;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    width: 1.25rem;
    height: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(31 41 55 / var(--tw-text-opacity, 1));
    margin-bottom: 0.5rem;
}

.form-select {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- Offers Grid --- */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

.offer-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.offer-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.offer-card .card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.75rem;
    padding-bottom: 0.5rem;
}

/* Align modal card-header badges horizontally and wrap if needed */
.download-modal .card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0 0.5rem 0;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-purple {
    background-color: #E9D5FF;
    color: #5B21B6;
}

.badge-default {
    color: #374151;
    line-height: 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid;
    padding: 0.25rem 0.625rem;
    --border: 214.3 31.8% 91.4%;
    border-color: hsl(var(--border));
    font-weight: 600;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    outline: none;
    font-size: 0.75rem;
}

.badge-icon {
    width: 1rem;
    height: 1rem;
}

.badge-icon-sm {
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.25rem;
}

.valid-thru {
    text-align: right;
}

.valid-thru-label {
    font-size: 0.75rem;
    color: #4B5563;
    margin-bottom: 0.25rem;
}

.valid-thru-date {
    font-size: 0.75rem;
    color: #1F2937;
    font-weight: 500;
}

.card-body {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(249, 250, 251, 0.9);
    margin: 0 1rem 1rem;
    border-radius: 0.5rem;
    min-height: 144px;
    max-height: 144px;
    overflow: hidden;
    box-shadow: 0 0 2px 0 var(--gray-300);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-pdf {
    width: 4rem;
    height: 5rem;
    object-fit: contain;
}

.offer-card .card-content {
    padding: 0 0.75rem 0.5rem;
}

.card-title {
    font-size: 1rem;
    line-height: 1.24rem;
    font-weight: 700;
    --tw-text-opacity: 1;
    color: rgb(17 24 39 / var(--tw-text-opacity, 1));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.25rem;
    overflow: hidden;
    margin: 0 0 1rem;
}

.card-description {
    color: #4b5563;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Show full description in modal details */
.download-modal .card-description {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
    min-height: unset;
    max-height: none;
    white-space: normal;
}

.card-preview {
    padding: 0 0.75rem 0.75rem;
}

.pdf-preview {
    height: 8rem;
    background-image: linear-gradient(to bottom right, #f9fafb, #e5e7eb);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: #6b7281;
    border: 1px solid #e5e7eb;
}

.pdf-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.pdf-text {
    font-size: 0.75rem;
    margin: 0;
}

.offer-card .card-footer {
    padding: 0 0.75rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    flex-direction: column;
}

/* --- Help & Terms Sections --- */
.rebate-help {
    padding: 4rem 1rem;
    background-color: var(--white);
}

.help-title {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.help-subtitle {
    font-size: 1.25rem;
    color: #4b5563;
    margin: auto;
    margin-bottom: 2rem;
    max-width: 56rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

.help-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.rebate-terms {
    padding: 2rem 1rem;
    background-color: #f3f4f6;
}

.rebates-terms-section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    background-color: var(--daikin-blue);
}

.rebates-offers-disclaimer {
    color: #ffffff;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 500;
    text-align: center;
}

#clear-filters-noresult {
    height: auto;
    font-size: .875rem;
    line-height: 1.25rem;
    font-weight: 500;
}

.no-rebates-message {
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: var(--flamingo);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Secure Download Modal --- */
.download-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 41, 59, 0.7); /* slate-900/70 */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px;
    transition: opacity 0.2s;
}

.download-modal {
    background: #fff;
    border-radius: .5rem;
    --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    padding: 1.5rem;
    max-width: 95vw;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    animation: modal-fade-in 0.2s;
    margin: auto;
}

#rebate-details-modal-image-container {
    width: 100%;
}

#rebate-details-modal-image-container img {
    max-height: 350px !important;
    border-radius: 1rem;
    box-shadow: 0 0 4px 0 var(--gray-300);
    margin: auto;
}

.download-pdf-btn {
    border-radius: 0.5rem;
    display: flex;
    gap: 5px;
    font-weight: 500;
    transition: 0.3s ease;
}

@keyframes modal-fade-in {
    from { transform: translateY(40px) scale(0.98); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.download-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--daikin-blue);
    margin-bottom: 0.5rem;
    text-align: center;
}

.download-modal-desc {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.download-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-modal-input {
    height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    padding: 0 0.75rem;
    font-size: 1rem;
    background: #f9fafb;
    color: #1e293b;
    font-size: .875rem;
    line-height: 1.25rem;
}

.download-modal-error {
    color: #991B1B;
    background: #FEE2E2;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.download-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.download-modal-cancel {
    background: none;
    border: none;
    color: var(--daikin-blue);
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    border-radius: 5px;
    width: 32px !important;
    height: 32px;
    border: 1px solid var(--gray-300);
    transition: background 0.2s;
}
.download-modal-cancel:hover {
    background: #f3f4f6;
}

.download-modal-close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: background 0.2s;
    display: flex;
    width: 30px;
    height: 30px;
    justify-content: center;
    align-items: center;
}
.download-modal-close:hover {
    background: #f3f4f6;
    color: #1e293b;
}

.card-footer--button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.inline-download-form .download-modal-input {
    font-size: 10px;
    height: 2rem;
    outline: 0;
    padding: 0 10px;
    border-radius: 5px;
}

.download-confirm-btn {height: 32px !important;padding: 0 !important;display: flex !important;width: 32px !important;border-radius: 5px;}

.inline-download-form--panel {
    display: flex;
    gap: 3px;
}

.inline-download-form--footer {
    display: flex;
    gap: 3px;
}

.mx-56 {
    max-width: 56rem;
    margin: auto;
}

.rebate-hero .hero-button .Link {
    font-size: 1.125rem;
    line-height: 1.75rem;
    display: flex;
    width: 206px;
    height: 40px;
    align-items: center;
    justify-content: center;
    --tw-bg-opacity: 1;
    cursor: pointer;
    background-color: rgb(0 156 222 / var(--tw-bg-opacity, 1));
    border-radius: 0.5rem;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
    transition-duration: .15s;
}

.rebate-hero .hero-button .Link:hover {
    --tw-bg-opacity: 1;
    background-color: rgb(0 56 101 / var(--tw-bg-opacity, 1));
}

.download-modal button {
    padding: .5rem 1rem;
    height: 2.5rem;
    border-radius: .5rem;
}

.download-modal .button-secondary {
    border-color: rgb(226 232 240);
}

.download-modal-close {
    padding: 0 !important;
    top: 0 !important;
    right: 0 !important;
}

#password-modal {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: .5rem;
}

[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

/* --- Call-to-Action Section --- */
.rebate-cta {
    /* From: py-12 bg-gradient-to-r from-daikin-dark-navy to-daikin-blue */
    padding: 3rem;
    background-image: linear-gradient(to right, var(--daikin-dark-navy), var(--daikin-blue));
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    border-radius: 1rem;
    margin-top: 3rem;
}

.rebate-cta .title {
    /* From: text-2xl md:text-3xl font-bold text-white mb-4 */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.rebate-cta .description {
    /* From: text-lg text-slate-200 mb-6 max-w-2xl mx-auto */
    font-size: 1.125rem;
    color: var(--slate-200);
    margin-bottom: 1.5rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.rebate-cta .cta-button {
    /* From: inline-flex items-center justify-center... h-10 bg-white hover:bg-gray-100 text-daikin-dark-navy px-8 py-3 font-medium rounded-lg */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    background-color: var(--white);
    color: var(--daikin-dark-navy);
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.rebate-cta .cta-button:hover {
    background-color: var(--gray-100);
}

/* --- Responsive Media Queries --- */
@media (min-width: 640px) {

    /* sm: */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .help-buttons {
        flex-direction: row;
    }
}

@media (min-width: 768px) {

    /* md: */
    .hero-title {
        font-size: 3.75rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .search-title {
        font-size: 2.25rem;
    }

    .main-filter-inputs {
        flex-direction: row;
    }

    .filter-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .terms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rebate-cta .title {
        /* From: md:text-3xl */
        font-size: 1.875rem;
    }
}

@media (min-width: 1024px) {

    /* lg: */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .filter-panel {
        grid-template-columns: repeat(4, 1fr);
    }

    .offers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .download-modal {
        margin: 0 auto;
    }
    #password-modal {
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    .rebate-cta {
        padding-inline: 1.5rem;
    }
    .rebate-cta .cta-button {
        padding: 0.45rem 1rem;
    }
}
