/* 
    Transparency Portal - Custom Styles
    Author: Admin
    Description: Custom styles for the Transparency Portal
*/

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

a {
    color: #0d6efd;
    text-decoration: none;
}

a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Navbar Customization */
.navbar-dark .navbar-brand {
    font-weight: bold;
    letter-spacing: 0.5px;
}

.navbar-dark .nav-link.active {
    font-weight: 600;
}

/* Cards */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

.card-footer {
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* Dashboard Stats Cards */
.card.bg-primary, .card.bg-success, .card.bg-info, .card.bg-warning {
    transition: transform 0.3s ease;
}

.card.bg-primary:hover, .card.bg-success:hover, .card.bg-info:hover, .card.bg-warning:hover {
    transform: translateY(-5px);
}

/* Tables */
.table {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Document Icons */
.fa-file-pdf {
    color: #dc3545;
}

.fa-file-word {
    color: #0d6efd;
}

.fa-file-excel {
    color: #198754;
}

.fa-file-powerpoint {
    color: #fd7e14;
}

.fa-file-alt, .fa-file {
    color: #6c757d;
}

/* Category List */
.list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Document Viewer */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
    line-height: 1;
    vertical-align: middle;
}

/* Footer */
footer {
    margin-top: auto;
    padding-top: 2rem;
}

/* Admin Panel */
.admin-header {
    margin-bottom: 2rem;
}

/* Upload Progress */
.progress {
    height: 20px;
    margin-top: 10px;
}

/* Custom Animation for Loading */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.25rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Custom Utility Classes */
.bg-light-hover:hover {
    background-color: #f8f9fa !important;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User Profile Card */
.user-profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #6c757d;
    margin: 0 auto 1rem auto;
}

/* Document Details */
.document-meta-table {
    margin-bottom: 0;
}

.document-meta-table th, .document-meta-table td {
    padding: 0.5rem;
    border-top: none;
}

.document-meta-table th {
    font-weight: 600;
    width: 30%;
}

/* Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
    color: #212529;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}
