/**
 * Buddha Travel - Callback Manager Frontend Stylesheet
 */

/* ==========================================================================
   Base Card Container
   ========================================================================== */
.bt-callback-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    font-family: inherit;
    box-sizing: border-box;
}

.bt-callback-wrapper *,
.bt-callback-wrapper *::before,
.bt-callback-wrapper *::after {
    box-sizing: border-box;
}

.bt-callback-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
}

/* Header */
.bt-callback-header {
    margin-bottom: 20px;
    text-align: left;
}

.bt-callback-title {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 700;
    color: #066B96;
    line-height: 1.25;
}

.bt-callback-subtitle {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* ==========================================================================
   Form Rows & Inputs
   ========================================================================== */
.bt-callback-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bt-form-row {
    display: flex;
    flex-direction: column;
}

.bt-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.3;
}

.bt-required {
    color: #ef4444;
    font-weight: 700;
}

.bt-field-helper {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.35;
}

/* Inputs & Textareas */
.bt-input,
.bt-select,
.bt-textarea {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.bt-input::placeholder,
.bt-textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.bt-input:focus,
.bt-select:focus,
.bt-textarea:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.bt-input.has-error,
.bt-select.has-error,
.bt-textarea.has-error {
    border-color: #ef4444 !important;
    background-color: #fffaf0;
}

.bt-textarea {
    height: auto;
    min-height: 70px;
    resize: vertical;
}

/* Two Column Name Grid */
.bt-name-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 420px) {
    .bt-name-grid {
        grid-template-columns: 1fr;
    }
}

/* Icon Wrap */
.bt-input-icon-wrap {
    position: relative;
    width: 100%;
}

.bt-input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 17px;
    width: 17px;
    height: 17px;
    pointer-events: none;
}

.bt-input.bt-has-icon {
    padding-left: 36px;
}

/* Select Wrap with Custom Chevron */
.bt-select-wrap {
    position: relative;
    width: 100%;
}

.bt-select-wrap::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s;
}

.bt-select {
    padding-right: 32px;
    cursor: pointer;
}

/* ==========================================================================
   Time Range Selector
   ========================================================================== */
.bt-time-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.bt-time-chip {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1.4;
}

.bt-time-chip:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #0093DA;
}

.bt-time-chip.active {
    background: #0093DA;
    color: #ffffff;
    border-color: #0093DA;
    font-weight: 600;
}

.bt-time-range-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

.bt-time-sublabel {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 3px;
}

.bt-time-divider {
    font-size: 16px;
    font-weight: 700;
    color: #9ca3af;
    padding-top: 14px;
}

.bt-time-select {
    height: 36px;
    font-size: 13px;
    padding: 6px 8px;
    background-color: #ffffff;
}

/* ==========================================================================
   Submit Button & States
   ========================================================================== */
.bt-form-submit-row {
    margin-top: 8px;
}

.bt-callback-submit-btn {
    width: 100%;
    height: 44px;
    background: #0093DA;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.1s ease;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bt-callback-submit-btn:hover {
    background: #1f2937;
}

.bt-callback-submit-btn:active {
    background: #000000;
    transform: scale(0.99);
}

.bt-callback-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.bt-btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: bt-spin 0.75s linear infinite;
    margin-left: 8px;
}

.bt-callback-submit-btn.is-loading .bt-btn-spinner {
    display: inline-block;
}

@keyframes bt-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Alerts (Success & Error Messages)
   ========================================================================== */
.bt-callback-alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 4px;
}

.bt-callback-alert.is-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.bt-callback-alert.is-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.bt-alert-ref {
    display: inline-block;
    margin-top: 4px;
    font-weight: 700;
    background: #d1fae5;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==========================================================================
   jQuery UI Datepicker Custom Skin (Theme Matched)
   ========================================================================== */
.ui-datepicker {
    width: 290px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    font-family: inherit;
    font-size: 13px;
    z-index: 999999 !important;
    display: none;
}

.ui-datepicker .ui-datepicker-header {
    position: relative;
    padding: 4px 0 12px 0;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 8px;
}

.ui-datepicker .ui-datepicker-title {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #0093DA;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    position: absolute;
    top: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    font-weight: bold;
    text-decoration: none;
}

.ui-datepicker .ui-datepicker-prev {
    left: 4px;
}

.ui-datepicker .ui-datepicker-next {
    right: 4px;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: #f3f4f6;
    color: #0093DA;
}

.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    display: block;
    font-size: 12px;
}

.ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.ui-datepicker th {
    padding: 6px 0;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
}

.ui-datepicker td {
    padding: 2px;
    text-align: center;
}

.ui-datepicker td span,
.ui-datepicker td a {
    display: block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    margin: 0 auto;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    color: #1f2937;
    font-weight: 500;
}

.ui-datepicker td a:hover {
    background: #e0f2fe;
    color: #0369a1;
}

.ui-datepicker td.ui-datepicker-today a {
    border: 1px solid #0284c7;
    color: #0284c7;
}

.ui-datepicker td.ui-datepicker-current-day a,
.ui-datepicker td.ui-state-active a {
    background: #0284c7 !important;
    color: #ffffff !important;
}

.ui-datepicker .ui-state-disabled span {
    color: #d1d5db;
    cursor: not-allowed;
}

/* ==========================================================================
   Lightbox Modal Popup
   ========================================================================== */
.bt-callback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.bt-callback-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.bt-callback-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bt-callback-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: transparent;
    z-index: 2;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bt-callback-modal.is-open .bt-callback-modal-dialog {
    transform: scale(1);
}

.bt-callback-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    color: #4b5563;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.15s ease;
}

.bt-callback-modal-close:hover {
    background: #e5e7eb;
    color: #0093DA;
}

body.bt-modal-open {
    overflow: hidden;
}

/* ==========================================================================
   Floating Success Toast Notification
   ========================================================================== */
.bt-callback-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 440px;
    width: calc(100% - 32px);
    pointer-events: none;
}

@media (max-width: 640px) {
    .bt-callback-toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}

.bt-callback-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #d1fae5;
    border-left: 4px solid #10b981;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    font-family: inherit;
}

.bt-callback-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.bt-callback-toast.is-hiding {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
}

.bt-callback-toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.bt-callback-toast-content {
    flex: 1;
    min-width: 0;
}

.bt-callback-toast-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #065f46;
    line-height: 1.45;
    margin: 0;
}

.bt-callback-toast-ref {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    font-size: 12px;
    color: #047857;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.bt-callback-toast-ref strong {
    font-weight: 700;
    color: #065f46;
}

.bt-callback-toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    margin: -2px -4px 0 0;
    cursor: pointer;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.bt-callback-toast-close:hover {
    color: #374151;
    background: #f3f4f6;
}

