/* ========================================
   RECORDS PAGES - SHARED STYLES
   Used by: Current, Past Indoor, Past Outdoor, Past Relay, Past 55+
   ======================================== */

/* Container */
.records-container {
    margin: 160px auto 10px;
    padding: 0 15px;
    min-height: 500px;
    max-width: 1200px;
}

/* Title Bar */
.records-title-bar {
    border-bottom: 3px solid #b61b27 !important;
    padding-bottom: 10px !important;
    margin-bottom: 20px !important;
}

.records-container .records-title-bar h1 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #4a4a4a !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: Roboto, 'sans-serif' !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.records-container .records-title-bar h1 i {
    font-size: 1.5rem !important;
    color: #b61b27 !important;
}

/* Content Box */
.records-content {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.records-content .table {
    margin-bottom: 0;
    border-collapse: collapse;
    border: none !important;
}

/* Remove ALL Bootstrap table borders */
.records-content table,
.records-content table tbody,
.records-content table tbody tr,
.records-content table tbody tr td {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

/* Add only ONE bottom border per row */
.records-content table tbody tr {
    border-bottom: 1px solid #dee2e6 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

/* Remove border from last row */
.records-content table tbody tr:last-child {
    border-bottom: none !important;
}

/* Remove ALL borders from table-responsive container */
.records-content .table-responsive {
    border: none !important;
    box-shadow: none !important;
    overflow-x: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove any ::before or ::after pseudo-elements that might add borders */
.records-content .table-responsive::before,
.records-content .table-responsive::after,
.records-content table::before,
.records-content table::after {
    display: none !important;
    border: none !important;
}

/* PDF Icon */
.records-content .pdf-img {
    max-width: 47px;
    height: 58px;
}

/* Table Cells */
.records-content table td {
    font-size: 16px;
    color: #4a4a4a;
    vertical-align: middle;
    font-family: Roboto, sans-serif;
    padding: 15px 10px;
}

.records-content table td:nth-child(2) {
    text-align: right;
    width: 80px;
    padding-right: 20px;
}

.records-content table td span {
    font-weight: 600;
}

/* Make rows clickable on ALL form factors */
.records-content table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.records-content table tbody tr:hover {
    background-color: #f8f9fa;
}

.records-content table tbody tr:active {
    background-color: #e9ecef;
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .records-content table tbody tr {
        cursor: pointer;
    }
    
    .records-content table tbody tr:hover {
        background-color: #f8f9fa;
        transform: scale(1.001);
    }
    
    .records-content .pdf-img {
        transition: opacity 0.2s ease;
    }
    
    .records-content table tbody tr:hover .pdf-img {
        opacity: 1;
    }
}

/* Mobile responsive */
@media (max-width: 767px) {
    .records-container {
        margin-top: 80px;
        padding: 0 10px;
    }
    
    .records-title-bar {
        padding-bottom: 8px !important;
        margin-bottom: 15px !important;
    }
    
    .records-container .records-title-bar h1 {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
        gap: 8px !important;
    }
    
    .records-container .records-title-bar h1 i {
        font-size: 1.2rem !important;
    }
    
    .records-content {
        padding: 15px 5px !important;
    }
    
    /* Better horizontal spacing for records */
    .records-content table td {
        padding: 15px 8px !important;
        font-size: 15px !important;
    }
    
    .records-content table td:first-child {
        padding-left: 5px !important;
        padding-right: 10px !important;
        width: calc(100% - 80px) !important;
    }
    
    .records-content table td:nth-child(2) {
        width: 70px !important;
        padding-right: 10px !important;
    }
    
    /* Make rows block-level and fully clickable on mobile */
    .records-content table {
        display: block;
        width: 100%;
    }
    
    .records-content table tbody {
        display: block;
        width: 100%;
    }
    
    .records-content table tbody tr {
        display: block;
        width: 100%;
        border-bottom: 1px solid #dee2e6 !important;
        padding: 15px 40px 15px 10px;
        margin: 0;
        position: relative;
        box-sizing: border-box;
    }
    
    .records-content table tbody tr:last-child {
        border-bottom: none !important;
    }
    
    .records-content table tbody tr:active {
        background-color: #e9ecef;
    }
    
    .records-content table td {
        display: block;
        border: none !important;
        padding: 0;
        width: 100%;
        text-align: left;
    }
    
    /* Name takes full width */
    .records-content table td:first-child {
        padding-right: 0;
    }
    
    /* PDF icon as small indicator on right */
    .records-content table td:last-child {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        width: auto;
    }
    
    .records-content .pdf-img {
        max-width: 24px;
        height: 30px;
        opacity: 0.5;
    }
}
