/* Add this new style for badges row in table view */
.ipo-badges-row {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

/* IPO Manager - Main Styles */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.custom-table th {
    background-color: #e8f7f0;
    color: green;
    font-size: 13px;
    padding: 10px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 1;
}

.custom-table td {
    font-size: 13px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-weight: 500;
}

.custom-table tr:hover {
    background-color: #f1f1f1;
}

.custom-table tr:hover {
    background-color: #f8f9fa;
}

.ipo-table-company {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ipo-table-company > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Status Colors */
.positive-return {
    color: #28a745 !important;
    font-weight: 600;
}

.negative-return {
    color: #dc3545 !important;
    font-weight: 600;
}

/* Card Styles */
.ipo-cards {
    display: none;
    gap: 10px;
}

.ipo-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #9F9C9C;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.ipo-card-header {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.ipo-card-logo {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ipo-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ipo-card-title {
    flex: 1;
    min-width: 0;
}

.ipo-card-title h3 {
    margin: 0;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ipo-card-body {
    padding: 12px 10px;
}

.ipo-card-row {
    display: flex;
    margin: 0 -3px 8px;
}

.ipo-card-col {
    flex: 1;
    padding: 0 3px;
    min-width: 0;
}

.ipo-card-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 2px;
}

.ipo-card-value {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ipo-card-footer {
    display: flex;
    padding: 0 10px 12px;
    gap: 8px;
}

.ipo-card-button {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.ipo-card-button:hover {
    background: #40B04B;
    color: #fff;
    border-color: #40B04B;
}

.ipo-card-details {
    display: none;
    padding: 12px 10px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5eb;
}

.ipo-details-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.ipo-details-label {
    color: #6c757d;
    font-weight: normal;
}

.ipo-details-value {
    color: #333;
    font-weight: 500;
}

/* Badge Styles */
.ipo-type-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ipo-type-mainline {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.ipo-type-nse-sme {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.ipo-type-bse-sme {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.ipo-status-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 0;
    font-weight: 600;
    text-transform: uppercase;
}

.status-open {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-close {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.status-upcoming {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.status-listed {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

/* Filter and Search Styles */
.ipo-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

.ipo-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ipo-filters a {
    display: inline-block;
    padding: 6px 12px;
    background-color: #40B04B;
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #40B04B;
    transition: all 0.3s ease;
}

.ipo-filters a:hover {
    background-color: #359e40;
    border-color: #359e40;
}

.ipo-filters a.active {
    background-color: white;
    color: #40B04B;
}

.ipo-search {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.ipo-search input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.ipo-search input[type="text"]:focus {
    outline: none;
    border-color: #40B04B;
    box-shadow: 0 0 0 3px rgba(64, 176, 75, 0.2);
}

/* No Results Styles */
.ipo-no-results {
    text-align: center;
    padding: 40px 20px;
}

.ipo-no-results img {
    max-width: 200px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.ipo-no-results p {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .custom-table {
        display: none;
    }
    
    .ipo-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 10px; /* Add padding to both sides */
    }
    
   .ipo-card {
        margin: 0 0 10px; /* Remove horizontal margin and keep bottom margin */
    }
    
    .ipo-controls {
        flex-direction: column;
    }
    
    .ipo-search {
        max-width: 100%;
    }
    
    .ipo-card-title h3 {
        font-size: 14px;
    }
    
    .ipo-card-button {
        font-size: 12px;
    }
}

@media (min-width: 768px) {
    .ipo-cards {
        display: none;
    }
    
    .custom-table {
        display: table;
    }
}

/* Animation for Details Toggle */
.ipo-card-details {
    animation: fadeIn 0.3s ease-out;
}

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

/* Print Styles */
@media print {
    .ipo-controls, .ipo-card-footer {
        display: none !important;
    }
    
    .ipo-card {
        break-inside: avoid;
        border: none;
        box-shadow: none;
    }
    
    .ipo-card-details {
        display: block !important;
    }
}
/* Home IPO Table Specific Styles */
.home-ipo-wrapper {
    max-height: 400px; /* Show about 6 rows */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* Hide scrollbar for Firefox */
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.home-ipo-wrapper::-webkit-scrollbar {
    display: none;
    width: 0 !important;
}

.home-ipo-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    display: table !important; /* Force table display on all devices */
    margin: 0;
}

.home-ipo-table th {
    background-color: #e8f7f0;
    color: green;
    font-size: 13px !important;
    padding: 6px 8px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 1;
}

.home-ipo-table td {
    font-size: 13px !important;
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
    font-weight: 500;
}

.home-ipo-table tr:hover {
    background-color: #f8f9fa;
}

.home-ipo-table .ipo-table-company {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-ipo-table .ipo-table-company > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-ipo-table .ipo-type-badge,
.home-ipo-table .ipo-status-badge {
    font-size: 8px !important;
    padding: 1px 4px;
}

.home-ipo-table .ipo-table-company a {
    font-size: 13px;
    font-weight: 500;
}

.home-ipo-table .ipo-table-company img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    margin-right: 6px;
    object-fit: cover;
}

/* Make table responsive on small screens */
@media (max-width: 600px) {
    .home-ipo-wrapper {
        max-height: 300px;
    }
    
    .home-ipo-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .home-ipo-table th,
    .home-ipo-table td {
        padding: 4px 6px;
        font-size: 13px;
    }
    
    .home-ipo-table .ipo-table-company img {
        width: 30px;
    }
    
    .home-ipo-table .ipo-type-badge,
    .home-ipo-table .ipo-status-badge {
        font-size: 9px !important;
        padding: 1px 3px;
    }
}

/* Remove the mobile card view completely for home IPOs */
.home-ipo-cards {
    display: none !important;
}