/**
 * Frontend Styles for Doctor Token & Booking System
 */

/* Token Display widget styling */
.dts-token-display {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    max-width: 400px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

.dts-token-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: dts-shimmer 4s ease-in-out infinite;
}

@keyframes dts-shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.dts-clinic-name {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 12px;
    position: relative;
}

.dts-token-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.8;
    margin-bottom: 5px;
    position: relative;
    font-weight: 700;
}

.dts-token-number {
    font-size: 110px;
    font-weight: 800;
    line-height: 1;
    margin: 10px 0;
    position: relative;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.dts-token-caption {
    font-size: 13px;
    opacity: 0.8;
    position: relative;
}

/* Booking Form styling */
.dts-booking-form-wrapper {
    background: #ffffff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    max-width: 550px;
    margin: 30px auto;
    font-family: 'Outfit', sans-serif;
    border: 1px solid #e2e8f0;
}

.dts-booking-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 25px 0;
    text-align: center;
}

.dts-form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.dts-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.dts-required {
    color: #ef4444;
}

.dts-form-group input, 
.dts-form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    color: #334155;
    background-color: #f8fafc;
}

.dts-form-group input:focus, 
.dts-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background-color: #ffffff;
}

.dts-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Payment selection grid */
.payment-selection-container {
    margin-top: 15px;
}

.dts-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.dts-pay-card {
    position: relative;
    cursor: pointer;
}

.dts-pay-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dts-pay-card-content {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}

.dts-pay-card-content i {
    font-size: 22px;
    color: #475569;
}

.dts-pay-card-content .pay-logo {
    height: 22px;
    width: auto;
    object-fit: contain;
}

.dts-pay-card-content span {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.dts-pay-card-content small {
    font-size: 10px;
    color: #64748b;
    line-height: 1.2;
}

/* Hover & Checked states */
.dts-pay-card:hover .dts-pay-card-content {
    border-color: #2563eb;
    background-color: #f1f5f9;
}

.dts-pay-card input[type="radio"]:checked + .dts-pay-card-content {
    border-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dts-pay-card input[type="radio"]:checked + .dts-pay-card-content i {
    color: #2563eb;
}

/* Digital Instructions Panel */
.dts-digital-instructions-panel {
    background-color: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

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

.dts-digital-instructions-panel h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e3a8a;
}

.dts-digital-instructions-panel .instr-note {
    font-size: 12px;
    color: #1e40af;
    margin-bottom: 12px;
}

.pay-instruction-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dbeafe;
    margin-bottom: 16px;
}

.instr-payment-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.instr-text {
    font-size: 13px;
    color: #334155;
    line-height: 1.4;
    font-weight: 500;
}

/* File upload styling */
.dts-file-upload-wrapper {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
}

.dts-file-upload-wrapper:hover {
    border-color: #2563eb;
    background-color: #f8fafc;
}

.dts-file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dts-file-upload-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #64748b;
}

.dts-file-upload-trigger i {
    font-size: 26px;
    color: #2563eb;
}

.dts-file-upload-trigger span {
    font-size: 13px;
    font-weight: 500;
}

.dts-preview-image-container {
    margin-top: 14px;
    text-align: center;
}

.dts-preview-image-container img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Submit button */
.dts-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.dts-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

.dts-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.dts-booking-result {
    margin-top: 20px;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.dts-booking-result.success {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.dts-booking-result.error {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.dts-booking-result .token-number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    margin-top: 6px;
    color: #166534;
}

/* TV Display calling screen styles */
.dts-tv-display {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    padding: 50px 30px;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

.dts-theme-dark {
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    color: white;
}

.dts-theme-light {
    background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
    color: #0f172a;
}

.dts-tv-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dts-tv-logo {
    max-height: 80px;
    max-width: 250px;
    margin-bottom: 12px;
    object-fit: contain;
}

.dts-tv-clinic-name {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
}

.dts-tv-token-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dts-tv-label {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 6px;
    opacity: 0.7;
    margin-bottom: 10px;
    font-weight: 600;
}

.dts-tv-token {
    font-size: 260px;
    font-weight: 800;
    line-height: 0.9;
    color: #2563eb;
    text-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.dts-tv-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    padding-top: 25px;
}

.dts-tv-time {
    font-size: 40px;
    font-weight: 300;
    margin-bottom: 8px;
    font-feature-settings: "tnum";
}

.dts-tv-message {
    font-size: 18px;
    opacity: 0.7;
}

/* Chime blink call animation on TV */
.dts-token-updated {
    animation: dts-scale-flash 0.6s ease-out;
}

@keyframes dts-scale-flash {
    0% { transform: scale(1.2); color: #22c55e; }
    100% { transform: scale(1); }
}

/* Responsive configurations */
@media (max-width: 600px) {
    .dts-form-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .dts-booking-form-wrapper {
        padding: 24px 16px;
    }

    .dts-tv-token {
        font-size: 140px;
    }

    .dts-tv-time {
        font-size: 28px;
    }
}

/* Visual slots selector grid (Improved select layout) */
.dts-slots-visual-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.visual-slot-badge {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    outline: none;
}

.visual-slot-badge:hover:not(:disabled) {
    border-color: #2563eb;
    color: #2563eb;
    background-color: #eff6ff;
}

.visual-slot-badge.selected {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff !important;
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.visual-slot-badge.disabled, .visual-slot-badge:disabled {
    opacity: 0.45;
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* Expected token message badge alignment style */
.dts-expected-token-badge {
    animation: pulse 2s infinite;
}

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

/* TV Display doctor selector dropdown styling */
.dts-tv-doctor-selector-wrapper select {
    outline: none;
    cursor: pointer;
}