/* 
 * Additional Fees Management CSS
 * 
 * This file contains all styles for the additional fees management interface.
 * Consistent with the existing design patterns from account.css
 * 
 * ORGANIZATION:
 * 1. Table Styles
 * 2. Modal and Form Styles
 * 3. Button and Interactive Element Styles
 * 4. Status and Badge Styles
 * 5. Responsive Design
 * 
 * Last updated: 2025
 */

/* Additional Fees Management Specific Styles */

/* Enhanced Table Styles */
#feesTable {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

#feesTable thead th {
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

#feesTable tbody tr {
    transition: all 0.2s ease;
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
}

#feesTable tbody tr:hover {
    background-color: #e3f2fd !important;
    border-color: #2196f3 !important;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
    z-index: 2;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

#feesTable tbody tr td {
    background-color: #fff !important;
    vertical-align: middle;
    padding: 8px 12px;
}

#feesTable tbody tr:hover td {
    background-color: #e3f2fd !important;
    transition: background 0.2s;
    border-color: #dee2e6;
}

/* Table Column Specific Styles */
#feesTable th:nth-child(1),
#feesTable td:nth-child(1) {
    width: 60px;
    text-align: center;
}

#feesTable th:nth-child(2),
#feesTable td:nth-child(2) {
    width: 100px;
    text-align: center;
}

#feesTable th:nth-child(3),
#feesTable td:nth-child(3) {
    width: 120px;
    text-align: right;
    font-weight: 600;
    color: #28a745;
}

#feesTable th:nth-child(4),
#feesTable td:nth-child(4) {
    width: 300px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#feesTable th:nth-child(5),
#feesTable td:nth-child(5) {
    width: 140px;
    text-align: center;
    font-size: 0.9rem;
}

#feesTable th:nth-child(6),
#feesTable td:nth-child(6) {
    width: 100px;
    text-align: center;
}

#feesTable th:nth-child(7),
#feesTable td:nth-child(7) {
    width: 120px;
    text-align: center;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Amount Display Styles */
.amount-display {
    font-weight: 700;
    color: #28a745;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.amount-display::before {
    content: "£";
    font-size: 0.9em;
    opacity: 0.8;
}

/* Notes Display Styles */
.notes-display {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.notes-display:hover {
    white-space: normal;
    overflow: visible;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Action Button Styles */
.action-btn {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin: 0 2px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.edit {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.action-btn.edit:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

.action-btn.delete {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.action-btn.delete:hover {
    background-color: #c82333;
    border-color: #c82333;
    color: white;
}

/* Enhanced Modal Card Styles */
.modal-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.modal-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.modal-card .section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.1rem;
}

/* Form Input Styles */
.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

/* Header Components */
.header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search Container Styles - Use shared styles from shared-sidebar.css */

/* Action Bar Styles */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.action-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Dashboard Button Styles */
.dashboard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.dashboard-btn:hover {
    background-color: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
    text-decoration: none;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.progress-container {
    width: 200px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 2px;
    animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loading-text {
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 500;
}

.loading-component {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.progress-container-component {
    width: 150px;
    height: 3px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar-component {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 2px;
    animation: progress-animation 1.5s ease-in-out infinite;
}

.loading-text-component {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Validation Error Styles */
.error-message {
    color: #D32F2F;
    background-color: #FFEBEE;
    font-weight: bold;
    font-size: 14px;
    padding: 5px 10px;
    margin-top: 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 5px;
}

.input-error {
    border-color: #D32F2F !important;
}

.input-error:focus {
    box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25) !important;
}

/* Server Error Container */
.server-error-container {
    color: #D32F2F;
    background-color: #FFEBEE;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: none;
}

.server-error-container i {
    margin-right: 5px;
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #adb5bd;
}

.empty-state h4 {
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    #feesTable th:nth-child(4),
    #feesTable td:nth-child(4) {
        width: 250px;
        max-width: 250px;
    }
}

@media (max-width: 992px) {
    #feesTable th:nth-child(4),
    #feesTable td:nth-child(4) {
        width: 200px;
        max-width: 200px;
    }
    
    .action-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .action-left {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    #feesTable th:nth-child(4),
    #feesTable td:nth-child(4) {
        width: 150px;
        max-width: 150px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .action-btn {
        padding: 3px 6px;
        font-size: 0.75rem;
        min-width: 28px;
        height: 28px;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .amount-display {
        font-size: 0.9rem;
    }
    
    .notes-display {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    
    .action-bar {
        padding: 15px 0;
    }
    
    .action-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    #feesTable th,
    #feesTable td {
        padding: 6px 8px;
    }
    
    .action-btn {
        padding: 2px 4px;
        font-size: 0.7rem;
        min-width: 24px;
        height: 24px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-body {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .action-bar,
    .search-container,
    .dashboard-btn,
    .action-btn {
        display: none !important;
    }
    
    #feesTable {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    #feesTable thead th {
        background-color: #f0f0f0 !important;
        color: #000 !important;
    }
    
    #feesTable tbody tr {
        background-color: #fff !important;
        border: 1px solid #ccc !important;
    }
    
    #feesTable tbody tr:hover {
        background-color: #fff !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* Animation for table rows */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#feesTable tbody tr {
    animation: fadeInUp 0.3s ease-out;
}

/* Hover effects for interactive elements */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Custom scrollbar for table */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
