/* ==========================================
   Project Name: Shopless India
   File: public/css/style.css
   Description: Master CSS for Native App Experience, Glassmorphism & Animations
   ========================================== */

/* ==========================================
   1. Global Variables & Resets
   ========================================== */
:root {
    /* Blue Black Mix Gradient Colors */
    --bg-dark-blue: #0B132B;
    --bg-light-blue: #1C2541;
    --accent-blue: #3A506B;
    --primary-cyan: #5BC0BE;
    
    /* Glassmorphism Colors */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Text Colors */
    --text-white: #FFFFFF;
    --text-muted: #A0AAB2;
    
    /* Status Colors */
    --success-green: #00E676;
    --error-red: #FF3D00;
    --warning-orange: #FF9100;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent; /* Remove blue tap highlight on mobile */
}

body, html {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark-blue) 0%, var(--bg-light-blue) 100%);
    color: var(--text-white);
    overflow-x: hidden;
    user-select: none; /* Native app feel - text selection disabled */
}

/* Scrollbar Hide for Native Feel */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.app-wrapper {
    width: 100%;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   2. Premium Glassmorphism Utilities
   ========================================== */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.text-gradient {
    background: linear-gradient(45deg, #5BC0BE, #FFFFFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ==========================================
   3. Top Priority Toast Notification UI
   ========================================== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-container.hidden {
    display: none;
}

.toast-container.show {
    animation: slideDownToast 0.5s forwards;
}

.toast-container.hide {
    animation: slideUpToast 0.4s forwards;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
}

.toast-icon-success {
    font-size: 24px;
    color: var(--success-green);
    margin-right: 15px;
}

.toast-icon-error {
    font-size: 24px;
    color: var(--error-red);
    margin-right: 15px;
}

.toast-text {
    flex: 1;
}

.toast-text h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-white);
}

.toast-text p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    padding: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.toast-close-btn:active {
    transform: scale(0.8);
    color: var(--text-white);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    border-radius: 0 0 16px 16px;
}

.progress-success {
    background: var(--success-green);
    box-shadow: 0 0 10px var(--success-green);
}

.progress-error {
    background: var(--error-red);
    box-shadow: 0 0 10px var(--error-red);
}

/* ==========================================
   4. Global Touch Loader UI
   ========================================== */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 19, 43, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.global-loader.active {
    opacity: 1;
    visibility: visible;
}

.global-loader.hidden {
    display: none !important;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(91, 192, 190, 0.5);
}

/* ==========================================
   5. Wallet Balance Formatting (Wallet Icon + ₹)
   ========================================== */
.wallet-display {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
}

.wallet-display i.fa-wallet {
    color: var(--primary-cyan);
    margin-right: 8px;
    font-size: 20px;
}

.wallet-display .rupee-icon {
    color: var(--success-green);
    margin-right: 2px;
}

/* ==========================================
   6. Form & Global Buttons
   ========================================== */
.btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, #1C2541, #3A506B, #5BC0BE);
    background-size: 200% auto;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-primary:hover {
    background-position: right center;
}

/* ==========================================
   7. Animations (Keyframes)
   ========================================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideDownToast {
    0% { top: -100px; opacity: 0; }
    100% { top: 20px; opacity: 1; }
}

@keyframes slideUpToast {
    0% { top: 20px; opacity: 1; }
    100% { top: -100px; opacity: 0; }
}
