/* ============================================================
   FRONTEND CSS — Utility Rebates Manager
============================================================ */

/* ---- Outer wrapper ---- */
.ur-wrap {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
}

/* Stack vertically on mobile */
@media ( max-width: 768px ) {
    .ur-wrap {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   LEFT PANEL — Dropdowns
============================================================ */
.ur-dropdowns {
    width: 100%;
    min-height: 560px;
    background: #C9EBF5;
    border-radius: 30px;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Intro heading */
.ur-intro { margin-bottom: 4px; }

.ur-heading {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0d2d3e;
    margin: 0 0 12px;
    line-height: 1.3;
}

.ur-subheading {
    font-size: 0.95rem;
    color: #2c5f72;
    line-height: 1.6;
    margin: 0;
}

/* Label above each dropdown */
.ur-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1a4a5a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 6px;
}

.ur-field-group {
    display: flex;
    flex-direction: column;
}

/* Select2 overrides inside the blue panel */
.ur-dropdowns .select2-container .select2-selection--single {
    height: 46px;
    border: none;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ur-dropdowns .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px;
    color: #333;
    padding-left: 14px;
}
.ur-dropdowns .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 8px;
}
.ur-dropdowns .select2-container--default.select2-container--open .select2-selection--single {
    border-radius: 12px 12px 0 0;
}

/* ============================================================
   RIGHT PANEL — Results
============================================================ */
.ur-results {
    position: relative;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    padding: 30px;
    min-height: 560px;
    background: #EBFFF4;
    border: 1px solid rgba(102, 102, 102, 0.4);
    border-radius: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Placeholder state */
.ur-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 400px;
    color: #6aad89;
}
.ur-placeholder-icon { font-size: 3rem; margin-bottom: 16px; }
.ur-placeholder p { font-size: 1rem; color: #5a9e75; margin: 0; }

/* Spinner */
.ur-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #4a9e6a;
}

/* Override WP spinner color to match green theme */
.ur-spinner .spinner {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="%234a9e6a" d="M10 3a7 7 0 1 0 7 7h-2a5 5 0 1 1-5-5V3z"/></svg>');
    float: none;
}

/* ============================================================
   SECTION TITLES
============================================================ */
.ur-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a3d2b;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #b2dfc3;
    text-align: left;
}

/* ============================================================
   PRODUCTS GRID — 2 column as specified
============================================================ */
.ur-products-section {
    margin-bottom: 24px;
    text-align: left;
}

.ur-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: flex-end;
    column-gap: 20px;
    row-gap: 20px;
}

@media ( max-width: 560px ) {
    .ur-products-grid { grid-template-columns: 1fr; }
}

.ur-product-card {
    background: #fff;
    border: 1px solid #c8eed9;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    text-align: left;
}
.ur-product-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Anchor that wraps image + title when a product_link exists */
.ur-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.ur-product-link:hover .ur-product-name {
    text-decoration: underline;
    color: #1565c0;
}

.ur-product-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8f7ef;
}
.ur-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ur-product-body { padding: 14px; }
.ur-product-name { font-size: .95rem; font-weight: 600; margin: 0; color: #1a3d2b; }

/* ============================================================
   LINKS
============================================================ */
.ur-links-section {
    margin-bottom: 24px;
    text-align: left;
}
.ur-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ur-link-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
}
.ur-link-btn:hover { opacity: .88; transform: translateY(-1px); }

.ur-link-download_application { background: #1565c0; color: #fff; }
.ur-link-apply_online          { background: #2e7d32; color: #fff; }
.ur-link-apply_now             { background: #e65100; color: #fff; }
.ur-link-view_eligible         { background: #6a1b9a; color: #fff; }
.ur-link-custom                { background: #37474f; color: #fff; }

/* ============================================================
   NOTES
============================================================ */
.ur-notes-section {
    text-align: left;
}
.ur-notes {
    background: #fff;
    border-left: 4px solid #34a85a;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    font-size: .88rem;
    line-height: 1.7;
    color: #2d4a38;
}
.ur-notes p:last-child { margin-bottom: 0; }
