/* Custom styles for Photo Upload App */

/* General styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

.footer {
    margin-top: auto;
    background-color: #343a40;
    color: #f8f9fa;
    padding: 20px 0;
}

.footer .text-muted {
    color: #adb5bd !important;
}

/* Enhanced Navbar */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #0d6efd;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 70%;
}

/* Offcanvas sidebar */
.offcanvas {
    max-width: 280px;
}

.offcanvas-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.offcanvas-menu .nav-link {
    padding: 0.75rem 1rem;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.offcanvas-menu .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

.offcanvas-menu .nav-link.active {
    background-color: rgba(13, 110, 253, 0.2);
    color: #0d6efd;
    font-weight: 500;
}

.offcanvas-menu .nav-link i {
    width: 24px;
    margin-right: 10px;
    text-align: center;
}

/* Card styles */
.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.card-img-top {
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
}

/* Document thumbnails use cover to fill the space */
.card-img-top.document-thumbnail {
    object-fit: cover;
    background-color: white;
}

/* Image details */
.img-fluid {
    max-height: 600px;
    object-fit: contain;
    border-radius: 5px;
}

/* Form styles */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Button styles */
.btn {
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

.btn-outline-primary:hover {
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

/* Badge styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 20px;
}

/* Alert styles */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

/* Table styles */
.table {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

.shadow {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

.rounded-xl {
    border-radius: 10px !important;
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #343a40;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.dark-mode-toggle:hover {
    background-color: #212529;
    transform: scale(1.1);
}

/* Modal z-index fixes */
.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

#batchDeleteModal {
    z-index: 9999 !important;
}

#batchDeleteModal .modal-backdrop {
    z-index: 9998 !important;
}

/* Force batch delete modal to be on top immediately */
#batchDeleteModal.show {
    z-index: 9999 !important;
    display: block !important;
}

#batchDeleteModal.show ~ .modal-backdrop {
    z-index: 9998 !important;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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