/* Custom styles for OneStation PWA */

/* Splash screen and animations */
#splash-screen {
    transition: opacity 0.5s ease-in-out;
}

#splash-screen.fade-out {
    opacity: 0;
}

#app-content.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-bounce {
    animation: bounce 1.5s infinite;
}

/* Shiny effect for buttons */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transform: skewX(-25deg);
    animation: shine 2s infinite;
}

@keyframes shine {
    100% { left: 125%; }
}

/* QR scanner overlay */
.qr-scanner {
    position: relative;
    overflow: hidden;
}

.scan-area {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
    animation: scan 2s infinite;
}

@keyframes scan {
    0% { border-color: rgba(255, 255, 255, 0.5); }
    50% { border-color: rgba(255, 255, 255, 1); }
    100% { border-color: rgba(255, 255, 255, 0.5); }
}

/* Card hover effects */
.service-card {
    transition: all 0.3s ease;
}

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

/* Modern input styles */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #0D8A3E;
    box-shadow: 0 0 0 3px rgba(13, 138, 62, 0.2);
}

/* PIN input styling */
.pin-input-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pin-input {
    width: 50px;
    height: 50px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #d1d5db;
    border-radius: 8px;
}

.pin-input:focus {
    border-color: #0D8A3E;
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 138, 62, 0.2);
}

/* Dashboard stats card */
.stat-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 0;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Balance display */
.balance-display {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #0D8A3E 0%, #0A6E32 100%);
}

/* Lao language-specific styles */
.lao-font {
    font-family: 'Phetsarath OT', 'Noto Sans Lao Looped', sans-serif;
}

/* Dark mode styles */
.dark .dark\:bg-gray-900 {
    background-color: #111827;
}

.dark .dark\:text-white {
    color: #fff;
}

.dark .dark\:border-gray-700 {
    border-color: #374151;
}

/* Progressive loading spinner */
.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(13, 138, 62, 0.3);
    border-radius: 50%;
    border-top-color: #0D8A3E;
    animation: spin 1s ease-in-out infinite;
}

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

/* Custom dropdown */
.custom-dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    z-index: 10;
    animation: slideIn 0.2s ease-out;
}

.custom-dropdown:hover .dropdown-content {
    display: block;
}

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

/* Custom switch toggle */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #0D8A3E;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .pin-input {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .scan-area {
        width: 180px;
        height: 180px;
    }
}

/* Prevent text from being selectable */
.no-select {
    user-select: none;
} 