/**
 * VietVed Booking Forms - Modal Styles
 * Telegram modal popup
 */

/* Modal Overlay */
.vietved-booking-form .vbf-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2147483647 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.vietved-booking-form .vbf-modal-overlay.show {
    display: flex !important;
}

/* Modal Container */
.vietved-booking-form .vbf-modal {
    background: #fff !important;
    border-radius: 16px !important;
    padding: 24px !important;
    max-width: 500px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    position: relative !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
    z-index: 2147483647 !important;
}

/* Modal Header */
.vietved-booking-form .vbf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.vietved-booking-form .vbf-modal-title {
    font-family: inherit !important;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.vietved-booking-form .vbf-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vietved-booking-form .vbf-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Modal Content */
.vietved-booking-form .vbf-modal-content {
    margin-bottom: 24px;
}

.vietved-booking-form .vbf-message-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #374151;
    max-height: 300px;
    overflow-y: auto;
}

/* Modal Info */
.vietved-booking-form .vbf-modal-info {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

.vietved-booking-form .vbf-modal-info.success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
    margin-top: 10px;
}

.vietved-booking-form .vbf-modal-info.warning {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Modal Actions */
.vietved-booking-form .vbf-modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.vietved-booking-form .vbf-modal-btn {
    font-family: inherit !important;
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vietved-booking-form .vbf-modal-btn.copy {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.vietved-booking-form .vbf-modal-btn.copy:hover {
    background: #e5e7eb;
}

.vietved-booking-form .vbf-modal-btn.copy.copied {
    background: #dcfce7;
    color: #16a34a;
    border-color: #16a34a;
}

.vietved-booking-form .vbf-modal-btn.whatsapp {
    background: var(--vietved-wa);
    color: #fff;
}

.vietved-booking-form .vbf-modal-btn.whatsapp:hover {
    background: #1fb354;
}

.vietved-booking-form .vbf-modal-btn.telegram {
    background: var(--vietved-tg);
    color: #fff;
}

.vietved-booking-form .vbf-modal-btn.telegram:hover {
    background: #0077b3;
}

.vietved-booking-form .vbf-modal-btn.vk {
    background: #0077ff;
    color: #fff;
}

.vietved-booking-form .vbf-modal-btn.vk:hover {
    background: #0066dd;
}

.vietved-booking-form .vbf-modal-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vietved-booking-form .vbf-modal-btn.disabled:hover {
    opacity: 0.5;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .vietved-booking-form .vbf-modal {
        margin: 10px;
        padding: 20px;
        max-width: calc(100vw - 20px);
    }

    .vietved-booking-form .vbf-modal-actions {
        flex-direction: column;
    }

    .vietved-booking-form .vbf-modal-btn {
        min-width: auto;
        width: 100%;
    }

    .vietved-booking-form .vbf-message-preview {
        font-size: 12px;
        max-height: 250px;
    }
}
