/* 
 * Click2Surat Main Stylesheet
 * Professional CSS for Click2Surat PHP Application
 */

:root {
    --brand-red: #e3000f;
    --brand-red-hover: #c7000d;
    --brand-dark: #1a1a1a;
    --brand-dark-hover: #2d2d2d;
    --brand-gray: #f9fafb;
    --brand-border: #e5e7eb;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
}

/* Smooth, premium hover elevations */
.hover-elevate {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-elevate:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
}

/* Glassmorphism for floating elements */
.glass-panel {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Active Nav States */
.nav-link.active {
    background-color: #e3000f !important;
    color: white !important;
    box-shadow: 0 -2px 10px rgba(227,0,15,0.3);
}
.mobile-nav-link.active {
    background-color: #e3000f !important;
    color: white !important;
}

/* Removed SPA hiding logic because this is a standard Multi-Page Application */
.page-section {
    display: block;
}
.page-section.active {
    display: block;
    animation: fadeIn 0.5s ease-out forwards;
}

/* Custom Animations */
@keyframes fadeInUp {
    0% { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeIn {
    0% { 
        opacity: 0; 
    }
    100% { 
        opacity: 1; 
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Flash Messages */
.flash-message {
    border-left-width: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
}

.flash-message.success {
    background-color: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

.flash-message.error {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.flash-message.warning {
    background-color: #fefce8;
    border-color: #eab308;
    color: #854d0e;
}

.flash-message.info {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(227, 0, 15, 0.2);
    border-color: #e3000f;
    background-color: white;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0.375rem;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--brand-dark);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--brand-red);
}

.btn-secondary {
    background-color: var(--brand-red);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: var(--brand-red-hover);
}

.btn-brand {
    background-color: var(--brand-red);
    color: white;
    border: none;
}

.btn-brand:hover {
    background-color: var(--brand-red-hover);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--brand-dark);
    border: 2px solid var(--brand-dark);
}

.btn-outline:hover {
    background-color: var(--brand-dark);
    color: white;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

.table tr:hover {
    background-color: #f9fafb;
}

/* Admin Panel Specific */
.sidebar {
    width: 250px;
    background-color: #1a1a1a;
    color: white;
    min-height: 100vh;
    transition: all 0.3s;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-menu-item:hover {
    background-color: #2d2d2d;
    color: white;
}

.sidebar-menu-item.active {
    background-color: #e3000f;
    color: white;
}

.sidebar-menu-icon {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar .menu-text {
        display: none;
    }
    
    .sidebar.collapsed .menu-text {
        display: none;
    }
}

/* Gujarati Text Typography */
.font-gujarati {
    font-family: 'Mukta Vaani', sans-serif;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

/* Search Bar Focus Effects */
.search-container:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -10px rgba(227, 0, 15, 0.15);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* Skeleton Loading Animation */
@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 0.5rem;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
    width: 60%;
}

.skeleton-card {
    height: 120px;
    width: 100%;
}

/* Sticky Search Header */
.sticky-search {
    position: sticky;
    top: 80px; /* Adjust based on your main navbar height */
    z-index: 40;
    transition: all 0.3s ease;
}

.sticky-search.is-pinned {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Transitions for dynamic content */
.ajax-container {
    transition: opacity 0.3s ease;
}

.ajax-loading {
    opacity: 0.5;
    pointer-events: none;
}