
/* General Body Styles */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 24px;
    font-weight: 700;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;

    margin-left: 20px;  /* Added to provide spacing between tabs */
}

/* Optional: Prevent left margin on the first link */
.nav-links a:first-child {
    margin-left: 0;
}

.nav-links a:hover {
    color: #007bff;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #e0f7fa, #bbdefb);
    color: #333;
    padding: 80px 20px;
    text-align: center;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    margin-bottom: 40px;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.5em;
    margin-bottom: 25px;
    color: #34495e;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #555;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.cta-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

/* Tabs */
.tabs-container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.tabs {
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid #eee;
}

.tab {
    flex-grow: 1;
    padding: 18px 25px;
    border: none;
    background-color: transparent;
    font-size: 1.1em;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
}

.tab:hover {
    color: #007bff;
}

.tab.active {
    color: #007bff;
    background-color: #eaf6ff;
}

.tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #007bff;
}

/* Controls (Search & Stats) */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1em;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.stats-container {
    display: flex;
    gap: 25px;
    background-color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    justify-content: center;
}

.stats {
    display: flex;
    gap: 25px;
    background-color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-item {
    font-size: 0.95em;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    color: #007bff;
}

.stat-item strong {
    color: #007bff;
    font-weight: 700;
}

/* IPO Table */
.table-container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    margin-bottom: 40px;
}

.ipo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    min-width: 900px; /* Ensure table doesn't get too narrow */
}

.ipo-table thead th {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.ipo-table tbody td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.ipo-table tbody tr:hover {
    background-color: #f1f7ff;
}

.ipo-table tbody tr:last-child td {
    border-bottom: none;
}

.ipo-name {
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ipo-name:hover {
    color: #0056b3;
    text-decoration: underline;
}

.date-range strong {
    color: #333;
}

.price-range {
    font-weight: 500;
    color: #28a745;
}

.subscription-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.subscription-status.high-subscription {
    background-color: #d4edda;
    color: #155724;
}

.subscription-status.medium-subscription {
    background-color: #fff3cd;
    color: #856404;
}

.subscription-status.low-subscription {
    background-color: #f8d7da;
    color: #721c24;
}

.subscription-status.tba-subscription {
    background-color: #e2e6ea;
    color: #495057;
}

.subscription-status:hover {
    opacity: 0.8;
}

.status-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.status-link:hover {
    text-decoration: underline;
}

.ipo-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85em;
}

.ipo-status-upcoming {
    background-color: #cfe2ff;
    color: #084298;
}

.ipo-status-open {
    background-color: #d1e7dd;
    color: #0f5132;
}

.ipo-status-closed {
    background-color: #f8d7da;
    color: #842029;
}

.ipo-status-allotment.pending {
    background-color: #ffecb5;
    color: #664d03;
}

.ipo-status-listed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.docs-column a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.docs-column a:hover {
    text-decoration: underline;
}

.loading,
.empty-state {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state h3 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state.error-state {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
}

.empty-state.error-state h3 {
    color: #721c24;
}

/* Upcoming IPOs Table Specifics */
#upcomingTable thead th:nth-child(2),
#upcomingTable tbody td:nth-child(2) {
    width: 150px; /* Adjust width for Last Updated column */
}

/* Allotment Status Table Specifics */
#allotmentDescription {
    background-color: #e9f7ef;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    color: #155724;
}

.dashboard-description {
    font-size: 1.1em;
    line-height: 1.8;
}

/* FAQ Section */
.faq-section {
    background-color: #ffffff;
    padding: 60px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-title {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 40px;
}

.faq-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background-color: #eaf6ff;
    padding: 18px 25px;
    border: none;
    text-align: left;
    font-size: 1.1em;
    font-weight: 600;
    color: #007bff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #dbeeff;
}

.faq-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.faq-question.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    color: #555;
    text-align: left;
}

.faq-answer.active {
    max-height: 300px; /* Adjust as needed */
    padding: 15px 25px 25px 25px;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 20px 20px 20px;
    font-size: 0.95em;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h4 {
    color: #ffffff;
    font-size: 1.3em;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.7;
    margin-bottom: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #007bff;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #95a5a6;
}

.footer-bottom p {
    margin: 5px 0;
    font-size: 0.9em;
}

.footer-bottom .disclaimer-text {
    margin-top: 10px;
    font-size: 0.85em;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Reduce header padding to make header smaller */
    .header {
        padding: 8px 10px; /* smaller vertical and horizontal padding */
    }

    /* Layout nav to be horizontal, aligned center with space between */
    .nav {
        flex-direction: row;             /* horizontal layout */
        justify-content: space-between; /* spread brand and links */
        align-items: center;
        padding: 0 10px;                 /* less horizontal padding */
    }

    /* Nav links horizontal, no wrap, allow horizontal scroll if overflow */
    .nav-links {
        display: flex;                  /* flex container */
        flex-direction: row;            /* horizontal line */
        flex-wrap: nowrap;              /* no wrapping */
        gap: 10px;                     /* space between links */
        margin-top: 0;                 /* remove top margin */
        overflow-x: auto;               /* allow scrolling if too wide */
        -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
    }

    /* Nav links style smaller to fit more in line */
    .nav-links a {
        font-size: 14px;               /* smaller font size */
        padding: 6px 8px;              /* less padding */
        white-space: nowrap;           /* prevent link text wrap */
        border-radius: 4px;
        background-color: transparent;
        border: none;                  /* no border */
        color: #555;
    }

    .nav-links a:hover {
        background-color: #007bff;
        color: white;
    }

    /* Make logo slightly smaller to fit header better */
    .nav-brand a img {
        height: 32px;                  /* smaller logo height */
    }
}

/* Popup Styles */
.popup-overlay {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    backdrop-filter: blur(5px); /* Blur effect */
    -webkit-backdrop-filter: blur(5px); /* Safari support */
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.popup-content h2 {
    color: #007bff;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.subscription-table-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.subscription-table-container th,
.subscription-table-container td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.subscription-table-container th {
    background-color: #f2f2f2;
    font-weight: 600;
    color: #333;
}

.subscription-table-container tr:nth-child(even) {
    background-color: #f9f9f9;
}

.subscription-table-container tr:hover {
    background-color: #f1f7ff;
}

.subscription-table-container td strong {
    color: #007bff;
}

.last-updated-text {
    font-size: 0.9em;
    color: #777;
    text-align: right;
    margin-top: 15px;
}

.popup-content p {
    text-align: center;
    font-size: 1.1em;
    color: #555;
    padding: 20px;
    background-color: #ffe0b2;
    border: 1px solid #ffcc80;
    border-radius: 8px;
}


