/* ═════════════════════════════════════════════════════════════════════════════ */
/* AGRIFARMERS CORE AUXILIARY STYLES                                             */
/* (Tailwind CSS provides all core utilities and layout)                         */
/* ═════════════════════════════════════════════════════════════════════════════ */

/* Loading screen styles */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #138808;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Page transitions */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Dashboard card hover effects */
.dashboard-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

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

/* OTP input styles */
.otp-digit {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 24px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    margin: 0 4px;
}

.otp-digit:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Hide scrollbar for features slider */
#featuresSlider {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#featuresSlider::-webkit-scrollbar {
    display: none;
}

/* Install button styles */
#installButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: #138808;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(19, 136, 8, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    animation: pulse 2s infinite;
}

#installButton:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(19, 136, 8, 0.4);
}

#installButton.hidden {
    display: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(19, 136, 8, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(19, 136, 8, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(19, 136, 8, 0);
    }
}

/* Install notification banner */
#installBanner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 99;
    display: none;
    align-items: center;
    border: 2px solid #138808;
    animation: slideUp 0.5s ease;
}

#installBanner.show {
    display: flex;
}

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

/* Offline indicator */
#offlineIndicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #dc2626;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    z-index: 1000;
    display: none;
}

#offlineIndicator.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Toast styles */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.3s ease;
    max-width: 300px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Leaflet Map Custom Pins */
.custom-mandi-pin, .custom-user-pin {
    background: transparent;
    border: none;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    padding: 2px;
}

.leaflet-popup-content {
    margin: 10px 14px;
    line-height: 1.4;
}

/* Print Styles */
@media print {
    body * { visibility: hidden; }
    #cropDoctorModal, #cropDoctorModal .modal-content, #cropDoctorModal #cdResultZone, #cropDoctorModal #cdResultZone * {
        visibility: visible;
    }
    #cropDoctorModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        display: block !important;
        padding: 0;
    }
    #cropDoctorModal .modal-content {
        max-width: 100% !important;
        box-shadow: none;
        border: none;
    }
    button, input, select { display: none !important; }
}