/* index.css - Styles for the public complaint submission page */

/* Ethiopian Flag Colors */
:root {
    --ethiopian-green: #000000;
    --ethiopian-yellow: #FCDD09;
    --ethiopian-red: #121fda;
    --primary-brown: #8B4513;
    --secondary-gold: #DAA520;
    --success-green: #28a745;
    --danger-red: #dc3545;
    --warning-yellow: #ffc107;
    --info-blue: #17a2b8;
    --dark-gray: #343a40;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --text-dark: #333;
    --text-muted: #6c757d;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    padding: 20px;
}

/* Ethiopian Flag Header */
.ethiopian-flag {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, 
        var(--ethiopian-green) 33%,
        var(--ethiopian-yellow) 33%,
        var(--ethiopian-yellow) 66%,
        var(--ethiopian-red) 66%
    );
    z-index: 1000;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    animation: slideDown 0.5s ease;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green), 
        var(--ethiopian-yellow), 
        var(--ethiopian-red)
    );
}

.header h1 {
    color: var(--primary-brown);
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.header h2 {
    color: var(--secondary-gold);
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: 400;
}

/* Ethiopian Date Display */
.ethiopian-date {
    background: linear-gradient(135deg, var(--primary-brown), var(--secondary-gold));
    color: white;
    padding: 20px 30px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
    animation: pulse 2s infinite;
}

.ethiopian-date p {
    margin: 5px 0;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ethiopian-date i {
    font-size: 1.3em;
}

/* Main Content Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Form Cards */
.submission-form,
.track-complaint {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease;
    transition: transform 0.3s, box-shadow 0.3s;
}

.submission-form:hover,
.track-complaint:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.submission-form h3,
.track-complaint h3 {
    color: var(--primary-brown);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--secondary-gold);
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.submission-form h3 i,
.track-complaint h3 i {
    color: var(--secondary-gold);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95em;
}

label i {
    margin-right: 8px;
    color: var(--secondary-gold);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
    background: white;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
select:hover,
textarea:hover {
    border-color: var(--secondary-gold);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-brown);
    box-shadow: 0 0 0 4px rgba(139, 69, 19, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload Section */
.file-upload-section {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    border: 2px dashed var(--border-color);
    transition: border-color 0.3s;
}

.file-upload-section:hover {
    border-color: var(--secondary-gold);
}

.file-upload-section h4 {
    color: var(--primary-brown);
    margin-bottom: 20px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-upload-section h4 i {
    color: var(--secondary-gold);
}

input[type="file"] {
    width: 100%;
    padding: 15px;
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

input[type="file"]:hover {
    border-color: var(--secondary-gold);
    background: #fff9e6;
}

small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.85em;
}

/* File Preview */
.file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.preview-item i {
    font-size: 2.5em;
    color: var(--primary-brown);
    margin-bottom: 5px;
}

.preview-item .file-name {
    font-size: 0.85em;
    word-break: break-all;
    color: var(--text-dark);
}

.preview-item .file-size {
    font-size: 0.75em;
    color: var(--text-muted);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-staff {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-brown);
    color: white;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.btn-primary:hover {
    background: #6B3410;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--secondary-gold);
    color: white;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.3);
}

.btn-secondary:hover {
    background: #B8860B;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
}

.btn-staff {
    background: var(--dark-gray);
    color: white;
    padding: 12px 25px;
    font-size: 1em;
}

.btn-staff:hover {
    background: #23272b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 58, 64, 0.3);
}

.btn-primary i,
.btn-secondary i,
.btn-staff i {
    font-size: 1.1em;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.form-actions .btn-primary {
    min-width: 250px;
}

/* Track Input Group */
.track-input-group {
    display: flex;
    gap: 10px;
}

.track-input-group input {
    flex: 1;
    border-radius: 50px;
    padding: 14px 20px;
}

.track-input-group .btn-secondary {
    padding: 14px 30px;
}

/* Alert Messages */
.alert {
    padding: 20px 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    animation: slideIn 0.5s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert i {
    font-size: 1.5em;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.alert.warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeeba;
}

.alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

.alert h4 {
    margin-bottom: 5px;
    font-size: 1.2em;
}

.alert p {
    margin: 0;
}

/* Complaint Card */
.complaint-details {
    margin-top: 30px;
    animation: slideUp 0.5s ease;
}

.complaint-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.complaint-header {
    background: linear-gradient(135deg, var(--primary-brown), var(--secondary-gold));
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracking-badge {
    font-size: 1.3em;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.status-badge {
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
}

.complaint-body {
    padding: 30px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item strong {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.info-item span {
    font-size: 1.1em;
    color: var(--text-dark);
    font-weight: 500;
}

/* Description Section */
.description-section,
.written-section,
.media-section,
.responses-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 15px;
}

.description-section h5,
.written-section h5,
.media-section h5,
.responses-section h5 {
    color: var(--primary-brown);
    margin-bottom: 15px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.description-content,
.written-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.media-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.media-preview {
    height: 150px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.media-preview img:hover {
    transform: scale(1.1);
}

.media-preview.video-preview video,
.media-preview.audio-preview audio {
    width: 100%;
    max-height: 150px;
}

.media-preview.document-preview i {
    font-size: 3em;
    color: var(--primary-brown);
}

.media-info {
    padding: 12px;
}

.media-name {
    font-size: 0.9em;
    margin-bottom: 5px;
    word-break: break-all;
    color: var(--text-dark);
}

.media-size {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.btn-download {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-brown);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85em;
    transition: background 0.3s;
}

.btn-download:hover {
    background: var(--secondary-gold);
}

/* Response Items */
.response-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary-gold);
    animation: slideIn 0.3s ease;
}

.response-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.response-header strong {
    color: var(--primary-brown);
}

.response-header small {
    color: var(--text-muted);
}

.response-content {
    line-height: 1.6;
    color: var(--text-dark);
}

.no-response {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 10px;
    color: var(--text-muted);
    font-style: italic;
}

/* Staff Login Section */
.staff-login {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0,0,0,0.1);
    border-left-color: var(--primary-brown);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
    animation: fadeIn 0.3s;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 5px solid white;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.image-modal-close:hover {
    color: var(--secondary-gold);
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 10px 25px rgba(139, 69, 19, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .header h1 {
        font-size: 2em;
    }
    
    .header h2 {
        font-size: 1.5em;
    }
    
    .main-content {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .header h2 {
        font-size: 1.3em;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ethiopian-date {
        padding: 15px 20px;
    }
    
    .ethiopian-date p {
        font-size: 1em;
    }
    
    .track-input-group {
        flex-direction: column;
    }
    
    .track-input-group .btn-secondary {
        width: 100%;
    }
    
    .complaint-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .media-grid {
        grid-template-columns: 1fr;
    }
    
    .response-header {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }
    
    .header h2 {
        font-size: 1.1em;
    }
    
    .submission-form h3,
    .track-complaint h3 {
        font-size: 1.3em;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-staff {
        width: 100%;
        padding: 12px 20px;
        font-size: 1em;
    }
    
    .form-actions .btn-primary {
        width: 100%;
    }
    
    .ethiopian-date {
        padding: 10px 15px;
    }
    
    .ethiopian-date p {
        font-size: 0.9em;
    }
    
    .alert {
        flex-direction: column;
        text-align: center;
    }
    
    .tracking-badge {
        font-size: 1em;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .header {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-staff,
    .staff-login,
    .file-upload-section {
        display: none !important;
    }
    
    .complaint-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}