/* css/upload.css */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz@14..32&display=swap');

* {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f4f7fb;
}

/* custom navy/teal palette */
.bg-navy-sidebar {
    background-color: #0c2538;
}

.bg-navy-deep {
    background-color: #0b1f33;
}

.text-teal-logo {
    color: #5ee0d0;
}

.border-teal-light {
    border-color: #2aa79b33;
}

/* hover effect for nav items */
.hover-nav:hover {
    background-color: #1f4e5e;
    color: white;
}

/* active navigation item */
.active-nav {
    background-color: #1a4450;
    border-left: 4px solid #2aa79b;
}

/* stat card styles */
.stat-card {
    transition: all 0.2s ease;
    border: 1px solid #eef2f6;
    background-color: white;
    border-radius: 0.75rem;
}

.stat-card:hover {
    box-shadow: 0 8px 20px -8px rgba(18, 79, 86, 0.15);
}

/* dashboard background */
.bg-dashboard-bg {
    background-color: #f4f7fb;
}

/* utility classes */
.text-teal-300 {
    color: #5eead4;
}

.text-teal-300\/70 {
    color: rgba(94, 234, 212, 0.7);
}

.bg-teal-800\/40 {
    background-color: rgba(17, 94, 89, 0.4);
}

.border-teal-400 {
    border-color: #2dd4bf;
}

/* transitions */
.transition {
    transition: all 0.2s ease;
}

.transition-colors {
    transition: all 0.2s ease;
}

/* focus states */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 1px #14b8a6;
}

/* file drop zone */
#dropZone {
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    min-height: 180px;
}

#dropZone:hover {
    border-color: #14b8a6;
    background-color: #f0fdfa;
}

/* form elements */
input[type="text"], 
input[type="date"], 
select, 
textarea {
    transition: all 0.2s ease;
    width: 100%;
    background-color: white;
}

input[type="text"]:focus, 
input[type="date"]:focus, 
select:focus, 
textarea:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 1px #14b8a6;
}

/* radio button styling */
input[type="radio"] {
    accent-color: #0f766e;
}

/* button styling */
.bg-teal-700 {
    background-color: #0f766e;
}

.bg-teal-700:hover {
    background-color: #115e59;
}

/* cancel button */
#cancelBtn {
    transition: all 0.2s ease;
}

#cancelBtn:hover {
    background-color: #f9fafb;
}

/* Mobile header spacer */
.mobile-header-spacer {
    height: 60px;
    width: 100%;
}

/* Sidebar - Mobile Responsive */
@media (max-width: 768px) {
    .w-72 {
        width: 100%;
        max-width: 280px;
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .w-72.open {
        left: 0;
    }
    
    main {
        width: 100%;
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 1001;
        background: #0c2538;
        color: white;
        border: none;
        border-radius: 0.5rem;
        padding: 0.5rem 0.875rem;
        cursor: pointer;
        font-size: 1.25rem;
        line-height: 1;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    .w-72 {
        position: relative;
        left: 0 !important;
    }
    
    .mobile-header-spacer {
        display: none;
    }
}

/* Form grid responsive */
@media (max-width: 768px) {
    .grid-cols-1.md\:grid-cols-2 {
        gap: 1rem;
    }
}

/* Form inputs responsive */
@media (max-width: 640px) {
    input, select, textarea {
        font-size: 16px !important;
    }
    
    label {
        font-size: 0.75rem;
    }
    
    .text-sm {
        font-size: 0.75rem;
    }
}

/* Header responsive */
@media (max-width: 640px) {
    h1.text-2xl.md\:text-3xl {
        font-size: 1.5rem;
    }
}

/* Recent uploads - mobile view */
@media (max-width: 768px) {
    .bg-white.rounded-xl.p-4.stat-card {
        padding: 0.75rem;
    }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    button, a, .upload-item-remove {
        min-height: 44px;
        min-width: 44px;
    }
    
    .overflow-y-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        font-size: 14px;
    }
}

/* Upload file list styles */
.upload-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 12px;
}

.upload-file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-item-name-wrap {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.upload-item-name {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

.upload-item-size {
    font-size: 0.7rem;
    color: #64748b;
}

.upload-item-remove {
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.upload-item-remove:hover {
    color: #dc2626;
    background-color: #fee2e2;
}

.upload-progress-track {
    margin-top: 8px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.upload-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #14b8a6, #0f766e);
    transition: width 0.2s ease;
}

.upload-progress-meta {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #475569;
}

@media (max-width: 640px) {
    .upload-item-name {
        font-size: 0.75rem;
    }
    
    .upload-item-size {
        font-size: 0.65rem;
    }
}

/* Modal styling */
#uploadSuccessModal.hidden {
    display: none;
}

#uploadSuccessModal {
    display: flex;
}

/* Print styles */
@media print {
    .sidebar, nav, .menu-toggle, button, .bg-teal-700 {
        display: none !important;
    }
    
    main {
        margin: 0;
        padding: 0;
    }
    
    .stat-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}


/* ============================================ */
/* REJECTION MODAL */
/* ============================================ */
.rejection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rejection-modal.active {
    opacity: 1;
    visibility: visible;
}

.rejection-modal:not(.hidden) {
    display: flex !important;
}

.rejection-modal.hidden {
    display: none !important;
}

.rejection-modal-container {
    background-color: white;
    width: 100%;
    max-width: 600px;
    margin-top: 0;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.2);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.rejection-modal.active .rejection-modal-container {
    transform: translateY(0);
}

.rejection-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #123a4d 0%, #1f5a6e 100%);
    color: white;
}

.rejection-modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.rejection-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.info-section {
    background-color: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid #e2e8f0;
}

.info-row {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    width: 40%;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.info-value {
    width: 60%;
    font-size: 0.82rem;
    color: #1e293b;
    font-weight: 500;
}

.comment-section {
    margin-top: 0.25rem;
}

.comment-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.6rem;
}

.comment-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-textarea:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.comment-textarea::placeholder {
    color: #94a3b8;
}

.rejection-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.btn-cancel {
    padding: 0.55rem 1.2rem;
    background-color: white;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background-color: #f1f5f9;
}

.btn-submit {
    padding: 0.55rem 1.2rem;
    background-color: #dc2626;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background-color: #b91c1c;
}

/* ============================================ */
/* COMMENTS MODAL */
/* ============================================ */
.comments-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background-color: #f8fafc;
}

.comment-item {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.comment-reviewer {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f766e;
}

.comment-date {
    font-size: 0.7rem;
    color: #94a3b8;
}

.comment-text {
    font-size: 0.82rem;
    color: #334155;
    line-height: 1.5;
}

/* Category badges */
.badge-instruction {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-research {
    background-color: #dcfce7;
    color: #166534;
}

.badge-extension {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-employment {
    background-color: #f3e8ff;
    color: #6b21a5;
}

.badge-department {
    background-color: #e0e7ff;
    color: #4338ca;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .rejection-modal-container {
        max-width: 95%;
        margin: 0 0.5rem;
    }

    .info-row {
        flex-direction: column;
        padding: 0.4rem 0;
    }

    .info-label,
    .info-value {
        width: 100%;
    }

    .rejection-modal-footer {
        flex-direction: column-reverse;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
        text-align: center;
    }
}
