/* Additional custom styles */

/* Hide all borders */
* {
    border: none !important;
}

/* Live tracking pulse animation for bus marker */
.live-tracking-pulse {
    animation: liveTrackingPulse 1s ease-in-out;
}

@keyframes liveTrackingPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bus-stop-item {
    transition: all 0.2s ease-in-out;
}

.bus-stop-item:hover {
    transform: translateX(5px);
}

.estimated-time {
    font-weight: 600;
}

/* Dashboard/Lobby Font Sizes - Enhanced for visibility */
.dashboard-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
}

/* Statistics section titles - smaller font size */
.dashboard-title.statistics-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.dashboard-subtitle {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

.dashboard-info-label {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
}

.dashboard-info-value {
    font-size: 1.25rem !important;
    font-weight: 500 !important;
}

.dashboard-stat-number {
    font-size: 3rem !important;
    font-weight: 700 !important;
}

.dashboard-stat-label {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
}

.dashboard-stop-name {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

.dashboard-stop-time {
    font-size: 1rem !important;
    font-weight: 500 !important;
}

.dashboard-upcoming-stop {
    font-size: 1.125rem !important;
    font-weight: 500 !important;
}

.dashboard-upcoming-time {
    font-size: 1rem !important;
    font-weight: 600 !important;
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 3px solid #3498db;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse animation for real-time updates */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Splash screen fade-out animation */
.fade-out {
    animation: fadeOut 0.5s ease-in-out forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

/* Map styles */
#map {
    transition: height 0.3s ease;
    height: 100%;
    width: 100%;
    z-index: 10 !important;
    position: relative;
}

/* All map containers should have z-index 10 */
#new-map,
#admin-bus-stops-map,
#add-stop-map,
#edit-stop-map {
    z-index: 10 !important;
    position: relative;
}

/* Hide Leaflet attribution completely */
.leaflet-control-attribution {
    display: none !important;
}

/* Ensure last stop overlay stays on top of map but below modals */
#last-stop-overlay {
    z-index: 49 !important;
    position: absolute !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Show overlay when visible */
#last-stop-overlay:not([style*="display: none"]) {
    display: flex !important;
}

/* Ensure text container stacks vertically */
#last-stop-overlay > div:last-child {
    display: flex !important;
    flex-direction: column !important;
}

/* Next stop overlay styling - below modals but above map */
#next-stop-overlay {
    z-index: 49 !important;
    position: absolute !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Show overlay when visible */
#next-stop-overlay:not([style*="display: none"]) {
    display: flex !important;
}

/* Ensure next stop text container stacks vertically */
#next-stop-overlay > div:last-child {
    display: flex !important;
    flex-direction: column !important;
}

/* Live requests overlay styling - below modals but above map */
#live-requests-overlay {
    z-index: 49 !important;
    position: absolute !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Show overlay when visible */
#live-requests-overlay:not([style*="display: none"]) {
    display: flex !important;
}

/* Ensure live requests text container stacks vertically */
#live-requests-overlay > div:last-child {
    display: flex !important;
    flex-direction: column !important;
}

/* Inactive bus overlay - covers both maps but below modals */
#inactive-bus-overlay {
    z-index: 48 !important;
    position: absolute !important;
    background-color: rgba(111, 111, 111, 0.83) !important; /* #6F6F6F 83% */
    display: none !important;
    border-radius: 0.5rem !important; /* matches rounded-lg */
}

/* Show inactive bus overlay when visible */
#inactive-bus-overlay:not([style*="display: none"]) {
    display: flex !important;
}

/* Map marker styles */
.custom-div-icon {
    background: transparent;
    border: none;
}

/* Current bus marker */
.bus-marker {
    background-color: #3b82f6;
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Update to ensure smoother transitions and prevent flickering */
.leaflet-marker-icon {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.leaflet-marker-pane {
    z-index: 49.5 !important;
}

/* Make sure the bus marker stays above map and overlays */
.custom-div-icon {
    z-index: 50 !important;
}

.bus-marker::after {
    content: '\f207';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 16px;
}

/* Bus stop marker */
.stop-marker {
    background-color: #93c5fd; /* Light blue color */
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Admin map bus stop marker */
.bus-stop-marker {
    background-color: #3b82f6;
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bus-stop-marker::after {
    content: '\f3c5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Ensure admin map markers are visible */
.custom-div-icon .bus-stop-marker {
    background-color: #3b82f6 !important;
}

/* Admin map container styling */
#admin-bus-stops-map {
    min-height: 384px; /* Fallback for h-96 equivalent */
    height: 100%;
}

/* Admin map bus stop marker styling */
.custom-div-icon .bus-stop-marker {
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Selected bus stop marker styling */
.bus-stop-marker.selected-marker {
    background-color: #f59e0b !important; /* Orange color for selected state */
    border: 3px solid #ffffff !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6) !important;
    transform: scale(1.1) !important;
    transition: all 0.2s ease !important;
}

.bus-stop-marker.selected-marker::after {
    content: '\f3c5' !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    color: white !important;
    font-size: 12px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Selected bus stop table row */
tbody tr.bus-stop-row.selected {
    background-color: #F3F3F3 !important;
}

/* Bus stop table row hover */
tbody tr.bus-stop-row:hover {
    background-color: #F3F3F3 !important;
}

/* User management table row hover */
tbody tr.user-row:hover:not(.selected) {
    background-color: #F3F3F3 !important;
}

/* Selected user management table row */
tbody tr.user-row.selected {
    background-color: #F3F3F3 !important;
}

/* Edit map bus stop marker */
.bus-stop-marker.edit-marker {
    background-color: #f59e0b;
    border: 3px solid #ffffff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: move;
    transition: all 0.2s ease;
}

.bus-stop-marker.edit-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.7);
}

.bus-stop-marker.edit-marker::after {
    content: '\f3c5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Add map bus stop marker */
.bus-stop-marker.add-marker {
    background-color: #10b981;
    border: 3px solid #ffffff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: move;
    transition: all 0.2s ease;
}

.bus-stop-marker.add-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.7);
}

.bus-stop-marker.add-marker::after {
    content: '\f067';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Last bus stop marker */
.last-bus-stop-marker {
    background-color: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.last-bus-stop-marker::after {
    content: '';
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNNjQ3LTQ0MEgxNjB2LTgwaDQ4N0w0MjMtNzQ0bDU3LTU2IDMyMCAzMjAtMzIwIDMyMC01Ny01NiAyMjQtMjI0WiIvPjwvc3ZnPg==');
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
    width: 16px;
    height: 16px;
    display: block;
}

/* Update timestamp styles */
.update-timestamp {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #4b5563;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
    text-align: center;
}

/* Expand map on larger screens */
@media (min-width: 768px) {
    #map {
        height: 100%;
        width: 100%;
    }
}

/* Ensure proper layout on different screen sizes */
@media (max-width: 1024px) {
    #bus-info-box {
        width: 100% !important;
    }
    
    #map {
        width: 100% !important;
        height: 100% !important;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Bus location update pulse animation */
.location-update-pulse {
    animation: stable-pulse-animation 1.5s ease-out;
}

@keyframes stable-pulse-animation {
    0% {
        transform: scale3d(1, 1, 1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        transform: scale3d(1.2, 1.2, 1);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        transform: scale3d(1, 1, 1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Tab button styles */
.tab-button {
    transition: all 0.2s ease;
}

.tab-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-button.active {
    font-weight: 600;
}

/* Driver status box styles */
#driver-status {
    transition: all 0.3s ease;
    cursor: pointer;
}

#driver-status.active {
    background-color: #10b981 !important;
    color: white !important;
    border-color: #059669 !important;
}

#driver-status.active .fas {
    color: white !important;
}

#driver-status.inactive {
    background-color: #ef4444 !important;
    color: white !important;
    border-color: #dc2626 !important;
}

#driver-status.inactive .fas {
    color: white !important;
}

#driver-status:hover:not(.active):not(.inactive) {
    background-color: #f3f4f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Admin table styles */
.admin-table {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-table th {
    font-weight: 600;
    background-color: #f9fafb;
}

.admin-table td {
    border-bottom: 1px solid #e5e7eb;
}

.admin-table tr:hover {
    background-color: #f9fafb;
}

/* Admin form improvements */
.admin-form-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-form-section h2 {
    color: white;
}

/* Table responsive design */
@media (max-width: 1024px) {
    .admin-bus-stops-table {
        font-size: 0.875rem;
    }
    
    .admin-bus-stops-table td {
        padding: 0.5rem;
    }
    
    .admin-bus-stops-table .max-w-xs {
        max-width: 100px;
    }
}

/* Statistics grid layout */
.statistics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 768px) {
    .statistics-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Ensure chart containers are properly sized */
.statistics-grid section {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.statistics-grid .h-64 {
    flex: 1;
    min-height: 256px;
}

/* Center on bus button styles */
.center-on-bus-btn {
    width: 36px;
    height: 36px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #3b82f6;
    transition: all 0.2s ease;
}

.center-on-bus-btn:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
}

.center-on-bus-btn:active {
    background-color: #e5e7eb;
    transform: scale(0.95);
}

/* Enhanced bus marker styling to prevent flickering */
.bus-icon {
    /* Prevent flickering during updates */
    transform-origin: center center;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

/* Add hardware acceleration for all markers */
.leaflet-marker-icon,
.leaflet-marker-shadow {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

/* Add styling for the stop request button */
.stop-request-btn {
    transition: all 0.3s ease;
}

/* Tab navigation styling */
.tab-nav {
    transition: all 0.2s ease;
}

.tab-nav.active {
    border-bottom-color: #3b82f6 !important;
    color: #2563eb !important;
}

.tab-content {
    transition: opacity 0.2s ease;
}

/* Clickable table rows */
.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    background-color: #eff6ff !important;
}

.stop-request-btn.requested {
    background-color: #ffb3b3; /* Pastel red */
    color: #d32f2f; /* Darker red for text */
    border: 1px solid #ffcccc;
}

/* Auth Container Styles */
#auth-container {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Error Message Styles */
#auth-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Form Input Focus Styles */
input:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Button Styles */
button:focus {
    outline: none;
}

/* User Info Styles */
#user-info {
    animation: slideDown 0.3s ease-in-out;
}

/* Tab Button Animation Styles */
.tab-button {
    animation: slideDown 0.3s ease-in-out;
}

/* Main Dashboard and Control Panel buttons animation */
#main-tab, #admin-tab {
    animation: slideDown 0.3s ease-in-out;
}

/* Other important buttons animation */
#logout-button, #refresh-invitation-codes, #add-invitation-code, 
#refresh-users, #activate-selected-users, #deactivate-selected-users,
#change-code-btn, #clear-selection, #save-edit-btn, #cancel-edit-btn,
#delete-edit-btn, #add-stop-form button, #inline-edit-stop-form button,
#completed-stops-today, #completed-stops-week, #completed-stops-month, 
#completed-stops-all, #clear-invitation-filters, #clear-user-filter {
    animation: slideDown 0.3s ease-in-out;
}

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

/* Fade Out Animation for Splash Screen */
.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Loading Spinners */
.loading-spinner-large {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 100%;
    height: 100%;
    animation: spin 1s linear infinite;
}

.loading-spinner-small {
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top: 2px solid #3b82f6;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Map Controls */
.map-control-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-control-btn {
    padding: 8px 12px;
    background-color: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.map-control-btn:hover {
    background-color: #f0f0f0;
}

.map-control-btn i {
    margin-right: 6px;
}

.center-on-bus-btn {
    color: #3b82f6;
}

.center-on-stop-btn {
    color: #ef4444;
}

/* Refresh button border styling - override global border removal */
#refresh-invitation-codes,
#refresh-users {
    border: 1px solid #9ca3af !important; /* Gray border */
}

#refresh-invitation-codes:hover,
#refresh-users:hover {
    border: 1px solid #6b7280 !important; /* Darker gray on hover */
}

/* Form input field borders - override global border removal */
#add-stop-form input,
#add-stop-form textarea,
#inline-edit-stop-form input,
#inline-edit-stop-form textarea,
#edit-stop-form input,
#edit-stop-form textarea {
    border: 1px solid #d1d5db !important; /* Gray border */
}

#add-stop-form input:focus,
#add-stop-form textarea:focus,
#inline-edit-stop-form input:focus,
#inline-edit-stop-form textarea:focus,
#edit-stop-form input:focus,
#edit-stop-form textarea:focus {
    border: 1px solid #3b82f6 !important; /* Blue border on focus */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}

/* Custom dropdown styling for invitation code sort */
#invitation-code-sort {
    padding-right: 2.5rem !important; /* Space for custom arrow icon */
}

/* Invitation code modal input field borders */
.invitation-input {
    border: 1px solid #9CA3AF !important; /* Gray border */
}

.invitation-input:focus {
    border: 2px solid #3b82f6 !important; /* Blue border on focus */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}

/* Ensure consistent icon sizing for manage users buttons */
#change-code-btn img,
#activate-selected-users img,
#deactivate-selected-users img {
    width: 1rem !important;
    height: 1rem !important;
    max-width: 1rem !important;
    max-height: 1rem !important;
}

/* Refresh button in manage bus stops section - override global border removal */
#refresh-bus-stops {
    border: 1px solid #9ca3af !important; /* Gray border */
    background-color: transparent !important; /* No background color */
}

#refresh-bus-stops:hover {
    border: 1px solid #6b7280 !important; /* Darker gray on hover */
    background-color: #f9fafb !important; /* Light gray background on hover */
}

/* Cancel button in Add New Invitation Code modal - remove background, no border, gray text */
.close-invitation-modal {
    background-color: transparent !important; /* Remove background */
    border: none !important; /* Remove border */
    color: #6b7280 !important; /* Gray text color */
    padding: 0.5rem 1rem !important; /* Keep padding for clickable area */
}

.close-invitation-modal:hover {
    background-color: transparent !important; /* No background on hover */
    color: #4b5563 !important; /* Darker gray on hover */
}

/* Add New Invitation Code button - blue styling */
#add-invitation-code {
    background-color: #3b82f6 !important; /* Blue background */
    color: white !important; /* White text */
}

#add-invitation-code:hover {
    background-color: #2563eb !important; /* Darker blue on hover */
}

/* Change Bus Stop section border when visible */
#edit-form-container:not(.hidden) {
    border: 1px solid #C8C8C8 !important;
    border-radius: 0.5rem !important;
    padding: 1.5rem !important;
}

/* Add Bus Stop section border when visible */
#add-tab-content:not(.hidden) {
    border: 1px solid #C8C8C8 !important;
    border-radius: 0.5rem !important;
    padding: 1.5rem !important;
}

/* Add New Bus Stop button in header - ensure it's above map */
#add-tab {
    z-index: 20 !important;
    position: relative !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

#add-tab:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Forgot Password Modal Styles */
#forgot-password-modal {
    animation: fadeIn 0.3s ease-in-out;
}

#forgot-password-modal .bg-white {
    animation: slideIn 0.3s ease-in-out;
}

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

/* Forgot password form input focus styles */
#forgot-email:focus {
    border: 1px solid #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}

/* Forgot password success message animation */
#forgot-password-success {
    animation: slideDown 0.3s ease-in-out;
}

/* Forgot password error message animation */
#forgot-password-error {
    animation: shake 0.5s ease-in-out;
}

/* Registration form styles */
#register-form .grid {
    gap: 1rem;
}

/* Auth form input borders - override global border removal */
#login-email,
#login-password,
#register-first-name,
#register-last-name,
#register-email,
#register-invitation-code,
#forgot-email {
    border: 1px solid #d1d5db !important; /* Gray border */
}

/* Registration form input focus styles */
#register-first-name:focus,
#register-last-name:focus,
#register-invitation-code:focus,
#login-email:focus,
#login-password:focus,
#forgot-email:focus {
    border: 1px solid #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}

/* Grayed out invitation code field for Tokai emails */
#register-invitation-code.bg-gray-100 {
    background-color: #f3f4f6 !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
    border: 1px solid #d1d5db !important; /* Maintain border when grayed out */
}

#register-invitation-code.bg-gray-100:focus {
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
}

/* Responsive design for registration form */
@media (max-width: 640px) {
    #register-form .grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Android Beta Download Section Styles */
#download-android-beta {
    position: relative;
    overflow: hidden;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

#download-android-beta:hover {
    opacity: 1;
}

#download-android-beta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.3s;
}

#download-android-beta:hover::before {
    left: 100%;
}

/* Android download section positioning */
.android-download-section {
    position: fixed;
    bottom: 15px;
    right: 15px;
    left: 15px;
    z-index: 1000;
    max-width: 260px;
    margin-left: auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    backdrop-filter: blur(3px);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px;
    display: none !important; /* Hidden by default - force with !important for Firebase Hosting */
    visibility: hidden; /* Additional hiding for Firebase Hosting */
    opacity: 0; /* Additional hiding for Firebase Hosting */
}

/* Show Android beta section when activated */
.android-download-section.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: slideInFromBottom 0.3s ease-out;
}

/* Desktop-specific show rules */
@media (min-width: 769px) {
    .android-download-section.show {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
    }
}

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

@media (max-width: 768px) {
    .android-download-section {
        position: relative;
        bottom: auto;
        right: auto;
        left: auto;
        margin-top: 1rem;
        max-width: 100%;
        padding: 16px;
        margin-left: 0;
    }
    
    .android-download-section.show {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
} 