/* AMTL Responsive Design Framework - Mobile Only */

/* ===== Base Styles ===== */
:root {
    --primary-green: #1e7e34;
    --secondary-green: #155724;
    --light-green: #d4edda;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --mobile-breakpoint: 768px;
    --tablet-breakpoint: 1024px;
    --desktop-breakpoint: 1200px;
}

/* ===== Mobile First Approach ===== */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 10000;
        background: var(--primary-green);
        border: none;
        border-radius: 8px;
        padding: 10px 15px;
        color: white;
        font-size: 18px;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .mobile-menu-toggle:hover {
        background: var(--secondary-green);
    }
    
    /* Dashboard stats */
    .dashboard-stats {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 20px;
    }
    
    /* Tables */
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 8px;
        word-wrap: break-word;
    }
    
    /* Forms */
    .form-row {
        flex-direction: column;
    }
    
    .form-row .col-md-6,
    .form-row .col-md-4,
    .form-row .col-md-8,
    .form-row .col-md-12 {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* Buttons */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-bottom: 10px;
        width: 100%;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-fullscreen-mobile {
        width: 100vw;
        max-width: none;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .modal-fullscreen-mobile .modal-content {
        height: 100%;
        border: 0;
        border-radius: 0;
    }
    
    .modal-fullscreen-mobile .modal-body {
        overflow-y: auto;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 10000;
        background: var(--primary-green);
        border: none;
        border-radius: 8px;
        padding: 10px 15px;
        color: white;
        font-size: 18px;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        padding: 20px;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* ===== Text Editor Font Color Fix ===== */
/* Make sure text editors have black text */
textarea,
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"] {
    color: #000000 !important;
}

textarea::placeholder,
.form-control::placeholder,
input::placeholder {
    color: #6c757d !important;
}

/* Rich text editors */
.note-editor .note-editable,
.cke_editable,
.tinymce-editor,
.editor-content {
    color: #000000 !important;
}

/* ===== Print Styles ===== */
@media print {
    .sidebar,
    .mobile-menu-toggle,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}
