/**
 * TMVN Modal Styles
 * Login/Registration and Vehicle Confirmation modals
 */

/* ===========================
   MODAL OVERLAY
   =========================== */

.tmvn-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

/* ===========================
   MODAL CONTENT
   =========================== */

.tmvn-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

/* ===========================
   MODAL HEADER
   =========================== */

.tmvn-modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tmvn-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.tmvn-modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tmvn-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* ===========================
   MODAL BODY
   =========================== */

.tmvn-modal-body {
    padding: 24px;
}

.tmvn-tab-content {
    display: none;
}

.tmvn-tab-content.active {
    display: block;
}

/* ===========================
   FORM FIELDS
   =========================== */

.tmvn-form-group {
    margin-bottom: 16px;
}

.tmvn-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.tmvn-form-group input[type="text"],
.tmvn-form-group input[type="email"],
.tmvn-form-group input[type="password"],
.tmvn-form-group input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.tmvn-form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.tmvn-form-group input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
}

/* ===========================
   ERROR MESSAGES
   =========================== */

.tmvn-form-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
}

/* ===========================
   BUTTONS
   =========================== */

.tmvn-btn-primary {
    width: 100%;
    background: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tmvn-btn-primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.tmvn-btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===========================
   TAB SWITCHING
   =========================== */

.tmvn-switch-tab {
    text-align: center;
    margin-top: 16px;
    color: #666;
    font-size: 14px;
}

.tmvn-switch-tab a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.tmvn-switch-tab a:hover {
    text-decoration: underline;
}

/* ===========================
   VEHICLE CONFIRMATION
   =========================== */

.tmvn-vehicle-confirm-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.tmvn-btn-success {
    flex: 1;
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tmvn-btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.tmvn-btn-danger {
    flex: 1;
    background: #dc3545;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tmvn-btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ===========================
   LOADING SPINNER
   =========================== */

.tmvn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

/* ===========================
   MOBILE RESPONSIVE
   =========================== */

@media (max-width: 480px) {
    .tmvn-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .tmvn-modal-header {
        padding: 20px 16px 12px 16px;
    }

    .tmvn-modal-header h2 {
        font-size: 20px;
    }

    .tmvn-modal-body {
        padding: 16px;
    }

    .tmvn-vehicle-confirm-actions {
        flex-direction: column;
    }
}
