/* Queue Booking Styles */
.queue-booking-container {
    background: 
        url('/queue_booking/static/src/img/hero-bullion.webp') center/cover no-repeat;
    min-height: 100vh;
    padding: 2rem 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.queue-booking-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 500px;
    margin: 0 auto;
    padding: 3rem;
    animation: slideUp 0.6s ease-out;
}

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

.queue-booking-header {
    text-align: center;
    margin-bottom: 2rem;
}

.btc-logo-container {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btc-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.3));
    transition: all 0.3s ease;
}

.btc-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(212, 175, 55, 0.4));
}

.queue-booking-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #D4AF37, #FFD700, #B8860B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.queue-booking-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.queue-booking-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: #D4AF37;
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #999;
    font-style: italic;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #D4AF37, #FFD700, #B8860B);
    color: #2c2c2c;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

/* Success Page Styles */
.success-container {
    background: 
        url('/queue_booking/static/src/img/hero-bullion.webp') center/cover no-repeat;
    min-height: 100vh;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.success-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 500px;
    margin: 0 auto;
    padding: 3rem;
    text-align: center;
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #B8860B;
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.queue-number {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #D4AF37, #FFD700, #B8860B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.new-booking-btn {
    display: inline-block;
    background: linear-gradient(135deg, #D4AF37, #FFD700, #B8860B);
    color: #2c2c2c;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.new-booking-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    color: #2c2c2c;
    text-decoration: none;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 1024px) {
    .queue-booking-container,
    .success-container {
        padding: 1rem 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .queue-booking-card,
    .success-card {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

@media (max-width: 768px) {
    .queue-booking-container,
    .success-container {
        padding: 0.5rem 0;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .queue-booking-card,
    .success-card {
        margin: 0.5rem;
        padding: 2rem 1.5rem;
        max-width: calc(100% - 1rem);
        border-radius: 15px;
    }
    
    .queue-booking-title,
    .success-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .btc-logo {
        height: 50px;
    }
    
    .queue-booking-subtitle {
        font-size: 1rem;
    }
    
    .queue-number {
        font-size: 3rem;
    }
    
    .form-control {
        padding: 0.9rem 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .queue-booking-container,
    .success-container {
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .queue-booking-card,
    .success-card {
        margin: 0.5rem;
        padding: 1.5rem 1rem;
        border-radius: 12px;
        max-width: calc(100% - 1rem);
    }
    
    .queue-booking-title,
    .success-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .btc-logo {
        height: 45px;
    }
    
    .queue-booking-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .queue-number {
        font-size: 2.5rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-control {
        padding: 0.8rem 0.9rem;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .submit-btn {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .success-message {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .new-booking-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .queue-booking-container,
    .success-container {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .queue-booking-card,
    .success-card {
        margin: 0.25rem;
        padding: 1.2rem 0.8rem;
        max-width: calc(100% - 0.5rem);
    }
    
    .queue-booking-title,
    .success-title {
        font-size: 1.6rem;
    }
    
    .btc-logo {
        height: 40px;
    }
    
    .queue-number {
        font-size: 2.2rem;
    }
    
    .form-control {
        padding: 0.7rem 0.8rem;
    }
    
    .submit-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Form Validation Styles */
.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Floating Labels Effect */
.form-group.floating-label {
    position: relative;
}

.form-group.floating-label .form-control {
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

.form-group.floating-label .form-label {
    position: absolute;
    top: 1rem;
    left: 1.2rem;
    color: #999;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 0.5rem;
}

.form-group.floating-label .form-control:focus + .form-label,
.form-group.floating-label .form-control:not(:placeholder-shown) + .form-label {
    top: -0.5rem;
    left: 1rem;
    font-size: 0.875rem;
    color: #D4AF37;
    font-weight: 600;
}

/* Admin View Styles */
.o_list_view .o_data_row.queue-booking-row {
    transition: all 0.3s ease;
}

.o_list_view .o_data_row.queue-booking-row:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.queue-number-badge {
    display: inline-block;
    background: linear-gradient(135deg, #D4AF37, #FFD700, #B8860B);
    color: #2c2c2c;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.queue-status-today {
    color: #28a745;
    font-weight: 600;
}

.queue-status-past {
    color: #6c757d;
    font-style: italic;
}

/* Success Animation */
@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #D4AF37;
    animation: confetti 3s linear forwards;
    pointer-events: none;
    z-index: 1000;
}

/* Status Color Enhancements */
.o_field_selection .o_input {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-align: center;
    min-width: 80px;
    display: inline-block;
}

/* Waiting Status - Blue */
.o_field_selection[data-decoration="info"] .o_input {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

/* In Progress Status - Orange */
.o_field_selection[data-decoration="warning"] .o_input {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

/* Completed Status - Green */
.o_field_selection[data-decoration="success"] .o_input {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Cancelled Status - Gray */
.o_field_selection[data-decoration="muted"] .o_input {
    background-color: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

/* Next Reservation Button Styling in Popup */
.o_form_view .o_form_statusbar .btn-primary {
    background: linear-gradient(135deg, #D4AF37, #FFD700, #B8860B);
    border: none;
    color: #2c2c2c;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

.o_form_view .o_form_statusbar .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #FFD700, #D4AF37, #B8860B);
}


/* Additional Mobile Optimizations */
@media (max-width: 576px) {
    .queue-booking-container,
    .success-container {
        background-attachment: scroll; /* Better performance on mobile */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .queue-booking-card,
    .success-card {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }
    
    /* Touch-friendly form elements */
    .form-control {
        min-height: 44px; /* iOS touch target minimum */
    }
    
    .submit-btn {
        min-height: 44px;
        touch-action: manipulation; /* Prevents double-tap zoom */
        -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
        cursor: pointer;
        user-select: none; /* Prevent text selection on touch */
        position: relative;
        overflow: hidden;
        -webkit-appearance: none; /* Remove default iOS button styling */
        appearance: none; /* Remove default button styling */
        border-radius: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Enhanced mobile button states */
    .submit-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .submit-btn:focus {
        outline: 2px solid #D4AF37;
        outline-offset: 2px;
    }
    
    /* Ensure button is always clickable on mobile */
    .submit-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }
    
    /* Better spacing for touch devices */
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    /* Improved floating label positioning on mobile */
    .form-group.floating-label .form-label {
        top: 0.8rem;
        left: 1rem;
    }
    
    .form-group.floating-label .form-control:focus + .form-label,
    .form-group.floating-label .form-control:not(:placeholder-shown) + .form-label {
        top: -0.3rem;
        left: 0.8rem;
    }
}
