/* Oregon Retail Investor Report 2026 - Shared Styles */
/* Used alongside TailwindCSS CDN */

/* Base customizations */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero gradient for section pages */
.hero-gradient {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c3e50 50%, #1a252f 100%);
}

.hero-gradient-blue {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #172554 100%);
}

.hero-gradient-emerald {
    background: linear-gradient(135deg, #047857 0%, #065f46 50%, #064e3b 100%);
}

.hero-gradient-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
}

.hero-gradient-orange {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 50%, #9a3412 100%);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

/* Navigation link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

/* Table row hover */
.table-row-hover:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Drawer / Modal styles */
.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    z-index: 80;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.drawer-overlay.open {
    display: block;
    opacity: 1;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(700px, 95vw);
    height: 100vh;
    background: white;
    border-left: 1px solid #e5e7eb;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.30);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 90;
    overflow: auto;
}

.drawer.open {
    transform: translateX(0);
}

/* Filter input styling */
.filter-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Range input pair */
.range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tab styles */
.tab-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-button:hover {
    color: #1f2937;
}

.tab-button.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Iframe wrapper */
.iframe-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: white;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 80vh;
    border: 0;
    display: block;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6b7280;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

/* Image gallery */
.gallery-thumb {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: block;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-thumb:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Mobile menu (for future use) */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .hero-gradient {
        background: #1e3a5f !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Story cards */
.story-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.story-card:hover {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.story-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #e5e7eb;
}

/* Pill badges */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.pill-blue {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.pill-green {
    background-color: #ecfdf5;
    color: #047857;
}

.pill-purple {
    background-color: #faf5ff;
    color: #7c3aed;
}

.pill-orange {
    background-color: #fff7ed;
    color: #c2410c;
}

.pill-gray {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* Custom Dropdown */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.custom-select__trigger:hover {
    border-color: #cbd5e1;
}

.custom-select.open .custom-select__trigger {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.custom-select__options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
    transition: all 0.2s;
}

.custom-select.open .custom-select__options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.custom-option {
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.1s;
    border-bottom: 1px solid #f9fafb;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background-color: #fff7ed;
    color: #c2410c;
}

.custom-option.selected {
    background-color: #ffedd5;
    color: #9a3412;
    font-weight: 600;
}

/* ============================================
   IMAGE CAROUSEL
   ============================================ */
.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 1rem;
    background: #f8fafc;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.carousel-slide {
    min-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.carousel-btn.prev {
    left: 12px;
}

.carousel-btn.next {
    right: 12px;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot.active {
    background: #fff;
    width: 24px;
}

/* ============================================
   FULL-SCREEN MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.open {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: #fff;
    width: min(1100px, 95vw);
    max-height: 90vh;
    border-radius: 1.5rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
}

/* ============================================
   TABBED INTERFACE
   ============================================ */
.tabs-container {
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 0;
}

.tab-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #334155;
    background: #f8fafc;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   PROPERTY REPORT SECTIONS
   ============================================ */
.property-section {
    border-bottom: 1px solid #e5e7eb;
    padding: 3rem 0;
}

.property-section:last-child {
    border-bottom: none;
}

.property-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .property-grid {
        grid-template-columns: 1fr;
    }
}

.property-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.theme-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-badge.purple {
    background: #f3e8ff;
    color: #7c3aed;
}

.theme-badge.blue {
    background: #dbeafe;
    color: #2563eb;
}

.theme-badge.emerald {
    background: #d1fae5;
    color: #059669;
}

.theme-badge.orange {
    background: #ffedd5;
    color: #ea580c;
}

.theme-badge.gray {
    background: #f1f5f9;
    color: #64748b;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 640px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.detail-item {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.detail-label {
    font-size: 0.675rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.insight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.insight-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}