/* Common Styles for NotesAPP */

body {
    background-color: #f8f9fa;
    padding-top: 70px; /* Space for fixed navbar */
    font-family: 'Hind Siliguri', sans-serif;
}

/* Container Styles */
.main-container {
    margin-top: 20px;
    margin-bottom: 50px;
}

.table-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.upload-container {
    max-width: 700px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Navbar Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    margin-right: 2px;
}

/* Navbar Link Font Size */
.navbar-nav .nav-link {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Mobile responsive navbar links */
@media (max-width: 768px) {
    .navbar-nav .nav-link {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
}

/* Form Styles */
.form-label {
    font-weight: 500;
}

.required::after {
    content: " *";
    color: red;
}

/* Account number styling - use monospace font */
.account-number {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Others page table text size */
.table-container .table {
    font-size: 1.05rem;
}

.table-container .table th {
    font-size: 1.1rem;
}

/* Footer Styles */
footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

footer p {
    margin-bottom: 0;
}

footer a {
    text-decoration: none;
    color: #0d6efd;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* Table Column Alignment */
#notesTable th:nth-child(1),
#notesTable td:nth-child(1),
#notesTable th:nth-child(3),
#notesTable td:nth-child(3),
#notesTable th:nth-child(5),
#notesTable td:nth-child(5),
#notesTable th:nth-child(6),
#notesTable td:nth-child(6) {
    text-align: center;
    vertical-align: middle;
}

/* DataTables Improvements */
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
    margin-bottom: 15px;
}

/* Column Width Optimization */
#notesTable th:nth-child(1) { width: 13%; }  /* Course code */
#notesTable th:nth-child(2) { width: 23%; } /* Course Name */
#notesTable th:nth-child(3) { width: 12%; } /* Session */
#notesTable th:nth-child(4) { width: 30%; } /* Topic */
#notesTable th:nth-child(5) { width: 14%; } /* Date */
#notesTable th:nth-child(6) { width: 8%; text-align: center; }  /* Action */

/* Mobile Optimizations */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
        padding-bottom: 20px;
    }
    
    .table-container,
    .upload-container {
        padding: 15px;
        border-radius: 5px;
    }
    
    .table-container h4 {
        font-size: 1.1rem;
    }
    
    /* Make table more readable on mobile */
    .table-responsive {
        font-size: 0.9rem; /* Increased from 0.8rem */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #notesTable {
        min-width: 650px;
    }
    
    #notesTable th,
    #notesTable td {
        padding: 0.6rem 0.4rem; /* Increased padding */
        white-space: nowrap;
    }
    
    #notesTable th:nth-child(4),
    #notesTable td:nth-child(4) {
        white-space: normal;
        max-width: 180px;
    }
    
    /* Compact buttons on mobile */
    .btn-sm {
        padding: 0.35rem 0.6rem;
        font-size: 1rem; /* Increased icon button size */
    }
    
    /* Stack DataTables controls vertically on mobile */
    .dataTables_wrapper .row {
        display: flex;
        flex-direction: column;
    }
    
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100% !important;
        margin-bottom: 10px;
        text-align: left !important;
    }
    
    /* Show fewer entries by default on mobile */
    .dataTables_wrapper .dataTables_length {
        font-size: 0.9rem;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        max-width: 100%;
        font-size: 1rem;
    }
    
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        width: 100% !important;
        text-align: center !important;
        margin-top: 10px;
        font-size: 0.9rem;
    }
    
    /* Smaller pagination buttons on mobile */
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.4rem 0.7rem;
        font-size: 0.9rem;
        margin: 0 2px;
    }
    
    /* Badge styling for mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.3em 0.6em;
    }
    
    /* Footer responsive */
    footer {
        padding: 1rem 0.5rem !important;
        margin-top: 2rem !important;
        font-size: 0.9rem;
    }
    
    footer p {
        line-height: 1.6;
        word-wrap: break-word;
    }
}

/* Extra Small Devices (phones < 576px) */
@media (max-width: 576px) {
    .table-container {
        padding: 12px;
    }
    
    .table-responsive {
        font-size: 0.85rem; /* Increased from 0.75rem */
    }
    
    #notesTable th,
    #notesTable td {
        padding: 0.5rem 0.3rem; /* Increased padding */
    }
    
    .btn-sm {
        padding: 0.3rem 0.5rem;
    }
    
    .btn-sm i {
        font-size: 0.95rem; /* Increased icon size */
    }
    
    /* Footer extra small devices */
    footer {
        font-size: 0.85rem;
        padding: 1rem 0.75rem !important;
    }
    
    footer a {
        display: inline-block;
        word-break: break-word;
    }
}

/* Responsive Adjustments for Tablets */
@media (max-width: 992px) and (min-width: 769px) {
    #notesTable th:nth-child(1) { width: 10%; }
    #notesTable th:nth-child(2) { width: 22%; }
    #notesTable th:nth-child(3) { width: 10%; }
    #notesTable th:nth-child(4) { width: 32%; }
    #notesTable th:nth-child(5) { width: 13%; }
    #notesTable th:nth-child(6) { width: 8%; }
}
