/* IPOChatter - Modern Bootstrap Styles */

:root {
    --bs-primary: #1a365d;
    --bs-primary-rgb: 26, 54, 93;
    --bs-secondary: #38b2ac;
    --bs-success: #48bb78;
    --bs-warning: #ed8936;
    --bs-danger: #e53e3e;
    --bs-info: #4299e1;
    --bs-light: #f7fafc;
    --bs-dark: #2d3748;
    
    --gradient-primary: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #38b2ac 100%);
    --gradient-secondary: linear-gradient(135deg, #38b2ac 0%, #4fd1c7 100%);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom Bootstrap overrides */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-primary {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.min-vh-50 {
    min-height: 50vh;
}

.stat-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--bs-primary) !important;
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--bs-primary) !important;
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* IPO Table Styles */
.ipo-row {
    transition: all 0.2s ease;
}

.ipo-row:hover {
    background-color: var(--bs-light) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.table > :not(caption) > * > * {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table-hover > tbody > tr:hover > * {
    background-color: transparent;
}

/* Progress bars for confidence */
.progress {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Modal enhancements */
.modal-content {
    border: none;
    box-shadow: var(--shadow-large);
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .table-responsive {
        border: none;
    }
    
    .ipo-row td {
        padding: 0.75rem 0.5rem;
    }
    
    .ipo-row td:first-child {
        padding-left: 1rem;
    }
    
    .ipo-row td:last-child {
        padding-right: 1rem;
    }
}

/* News Cards */
.news-card {
    border-left: 4px solid var(--bs-secondary);
}

.news-card:hover {
    border-left-color: var(--bs-primary);
}

/* Badges */
/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

.status-speculative {
    background: #6c757d !important;
    color: white !important;
}

.status-intent {
    background: var(--bs-info) !important;
    color: white !important;
}

.status-bankers {
    background: var(--bs-warning) !important;
    color: white !important;
}

.status-confidential {
    background: #fd7e14 !important;
    color: white !important;
}

.status-filed {
    background: #20c997 !important;
    color: white !important;
}

.status-completed {
    background: var(--bs-success) !important;
    color: white !important;
}

.status-cancelled, .status-canceled {
    background: var(--bs-danger) !important;
    color: white !important;
}

.status-withdrawn {
    background: var(--bs-danger) !important;
    color: white !important;
}

/* Legacy status support */
.status-confidential.filing, .status-confidential-filing {
    background: #fd7e14 !important;
    color: white !important;
}

.status-public.filing, .status-public-filing {
    background: #20c997 !important;
    color: white !important;
}

/* Legacy status support 
.status-expected {
    background: var(--bs-success) !important;
    color: white !important;
}

.status-rumoured, .status-rumored {
    background: var(--bs-info) !important;
    color: white !important;
}

.status-filed {
    background: var(--bs-warning) !important;
    color: white !important;
}

.status-priced {
    background: var(--bs-success) !important;
    color: white !important;
}

.status-pending {
    background: var(--bs-secondary) !important;
    color: white !important;
}*/

/* Default status styling */
.badge[class*="status-"] {
    color: white !important;
    font-weight: 600 !important;
}

/* Filter buttons styling */
.filter-buttons {
    white-space: nowrap;
}

@media (min-width: 992px) {
    .filter-buttons .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        white-space: nowrap;
    }
}

/* Ensure buttons don't wrap on desktop */
@media (min-width: 992px) {
    .flex-lg-nowrap {
        flex-wrap: nowrap !important;
        overflow-x: auto;
    }
}

/* Modals */
.modal-content {
    border: none;
    box-shadow: var(--shadow-large);
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* Forms */
.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 54, 93, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
}

footer .text-light-emphasis {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer .text-light-emphasis:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-soft {
    box-shadow: var(--shadow-soft) !important;
}

.shadow-medium {
    box-shadow: var(--shadow-medium) !important;
}

.shadow-large {
    box-shadow: var(--shadow-large) !important;
}

/* Clickable news cards */
.clickable-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.news-card {
    transition: transform 0.2s ease;
}

.news-card:hover {
    transform: translateY(-2px);
}


/* Mobile responsive table layout for IPO tables */
@media (max-width: 576px) {
    /* Home page prospective IPOs table - show only Company and Expected columns */
    #iposTable thead th:not(.mobile-company):not(.mobile-expected) {
        display: none;
    }
    
    #iposTable tbody td:not(.mobile-company):not(.mobile-expected) {
        display: none;
    }
    
    /* Completed IPOs table - show only Company and IPO Date columns */
    #completedIPOTable thead th:not(.mobile-company):not(.mobile-ipo-date) {
        display: none;
    }
    
    #completedIPOTable tbody td:not(.mobile-company):not(.mobile-ipo-date) {
        display: none;
    }
    
    /* Ensure Expected column is visible on mobile for home page */
    #iposTable .mobile-expected {
        display: table-cell !important;
    }
    
    /* Ensure IPO Date column is visible on mobile for completed page */
    #completedIPOTable .mobile-ipo-date {
        display: table-cell !important;
    }
    
    /* Mobile table cell styling */
    .mobile-company, .mobile-expected, .mobile-ipo-date {
        vertical-align: top !important;
        padding: 1rem 0.75rem !important;
        width: 50% !important;
    }
    
    .mobile-company-content {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .mobile-company-name {
        font-weight: 600;
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .mobile-company-subtitle {
        font-size: 0.875rem;
        color: #6b7280;
        font-weight: 400;
    }
    
    .mobile-expected-content {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        text-align: right;
    }
    
    .mobile-expected-date {
        font-weight: 500;
        font-size: 0.95rem;
        line-height: 1.2;
    }
    
    .mobile-expected-subtitle {
        font-size: 0.875rem;
        color: #6b7280;
        font-weight: 400;
    }
    
    /* Adjust table header text for mobile */
    .mobile-table-header {
        font-size: 0.875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 577px) and (max-width: 768px) {
    .table th, .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

