/**
 * Frontend Styles for The Events Calendar Ext
 */

/* ===== CSS VARIABLES ROOT - SHARED WITH ADMIN ===== */
:root {
    --tec-primary-color: #900055;
    --tec-primary-hover: #2563eb;
    --tec-primary-light: #60a5fa;
    --tec-success-color: #10b981;
    --tec-success-light: #dcfce7;
    --tec-success-border: #bbf7d0;
    --tec-success-text: #166534;
    --tec-error-color: #dc2626;
    --tec-error-light: #fef2f2;
    --tec-error-border: #fecaca;
    --tec-error-text: #991b1b;
    --tec-warning-color: #f59e0b;
    --tec-warning-light: #fefce8;
    --tec-warning-border: #fde68a;
    --tec-warning-text: #a16207;
    --tec-info-color: #0ea5e9;
    --tec-info-light: #d1ecf1;
    --tec-info-border: #bee5eb;
    --tec-info-text: #0c5460;
    --tec-gray-50: #f9fafb;
    --tec-gray-100: #f3f4f6;
    --tec-gray-200: #e5e7eb;
    --tec-gray-300: #d1d5db;
    --tec-gray-400: #9ca3af;
    --tec-gray-500: #6b7280;
    --tec-gray-600: #4b5563;
    --tec-gray-700: #374151;
    --tec-gray-800: #1f2937;
    --tec-gray-900: #111827;
    --tec-white: #ffffff;
    --tec-border-radius: 6px;
    --tec-border-radius-sm: 4px;
    --tec-border-radius-lg: 8px;
    --tec-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --tec-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --tec-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --tec-transition: all 0.15s ease-in-out;
}

/* ===== FORM REGISTER CONTAINER ===== */
.tec-ext-registration-form { border: 1px solid var(--tec-gray-300); border-radius:0.4em;padding: 30px; margin: 20px 0; }

/* ===== FORM HEADER ===== */
.tec-ext-form-header { margin-bottom: 25px; border-bottom: 2px solid var(--tec-gray-100); padding-bottom: 20px; }
.tec-ext-form-header h3 { color: var(--tec-gray-900); font-size: 24px; font-weight: 600; margin: 0 0 10px 0; line-height: 1.3; }
.tec-ext-event-info { margin-top: 15px; }
.tec-ext-event-date { color: var(--tec-gray-600); font-size: 14px; margin: 0; padding: 8px 12px; background: var(--tec-gray-50); border-radius: var(--tec-border-radius-sm); border-left: 3px solid var(--tec-primary-color); }

/* ===== FORM LAYOUT ===== */
.tec-ext-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.tec-ext-form-group { margin-bottom: 20px; }
.tec-ext-form-group:last-child { margin-bottom: 0; }
.tec-ext-form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--tec-gray-700); font-size: 14px; }
.tec-ext-form-group label .required { color: var(--tec-error-color); margin-left: 2px; }

/* ===== FORM INPUTS ===== */
.tec-ext-form-group input[type="text"], .tec-ext-form-group input[type="email"], .tec-ext-form-group input[type="tel"], .tec-ext-form-group textarea { width: 100%; padding: 12px 16px; border: 2px solid var(--tec-gray-200); border-radius: var(--tec-border-radius); font-size: 16px; line-height: 1.5; transition: var(--tec-transition); background: var(--tec-white); box-sizing: border-box; }
.tec-ext-form-group input:focus, .tec-ext-form-group textarea:focus { outline: none; border-color: var(--tec-primary-color); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.tec-ext-form-group textarea { resize: vertical; min-height: 100px; }

/* ===== FORM MESSAGES ===== */
.tec-ext-form-messages { margin-bottom: 20px; min-height: 20px; }
.tec-ext-message { padding: 12px 16px; border-radius: var(--tec-border-radius); margin-bottom: 15px; font-size: 14px; line-height: 1.5; }
.tec-ext-message.success { background-color: var(--tec-success-light); border: 1px solid var(--tec-success-border); color: var(--tec-success-text); }
.tec-ext-message.error { background-color: var(--tec-error-light); border: 1px solid var(--tec-error-border); color: var(--tec-error-text); }
.tec-ext-message.warning { background-color: var(--tec-warning-light); border: 1px solid var(--tec-warning-border); color: var(--tec-warning-text); }

/* ===== ERROR MESSAGES ===== */
.tec-ext-error { background-color: var(--tec-error-light); border: 1px solid var(--tec-error-border); color: var(--tec-error-text); padding: 16px; border-radius: var(--tec-border-radius); margin: 20px 0; font-size: 14px; }

/* ===== SUBMIT BUTTON ===== */
.tec-ext-form-actions { margin-top: 30px; text-align: center; }
.tec-ext-submit-btn { background: var(--tec-primary-color); color: var(--tec-white); border: none; padding: 14px 32px; font-size: 16px; font-weight: 600; border-radius: var(--tec-border-radius); cursor: pointer; transition: var(--tec-transition); position: relative; min-width: 180px; }
.tec-ext-submit-btn:hover { background: var(--tec-primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
.tec-ext-submit-btn:active { transform: translateY(0); box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4); }
.tec-ext-submit-btn:disabled { background: var(--tec-gray-400); cursor: not-allowed; transform: none; box-shadow: none; }
.tec-ext-submit-btn:disabled:hover { background: var(--tec-gray-400); transform: none; box-shadow: none; }

/* ===== BUTTON LOADING STATE ===== */
.tec-ext-submit-btn.loading { pointer-events: none; }
.tec-ext-btn-spinner { display: inline-flex; align-items: center; gap: 8px; }
.tec-ext-btn-spinner::before { content: ""; width: 16px; height: 16px; border: 2px solid #ffffff40; border-top: 2px solid var(--tec-white); border-radius: 50%; animation: tec-ext-spin 1s linear infinite; }

/* ===== ANIMATIONS ===== */
@keyframes tec-ext-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== CAPTCHA SECURITY VERIFICATION ===== */
.tec-ext-captcha-container { display: flex; align-items: center; gap: 15px; margin-top: 8px; }
.tec-ext-captcha-question { background: var(--tec-primary-color); color: var(--tec-white); padding: 10px 15px; border-radius: var(--tec-border-radius); font-weight: 600; font-size: 16px; min-width: 120px; text-align: center; }
.tec-ext-captcha-container input { flex: 0 0 80px; width: 80px !important; text-align: center; font-weight: 600; font-size: 16px; }

/* ===== FORM VALIDATION ===== */
.tec-ext-form-group.has-error input, .tec-ext-form-group.has-error textarea { border-color: var(--tec-error-color); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1); }
.tec-ext-form-group.has-error label { color: var(--tec-error-color); }
.tec-ext-field-error { color: var(--tec-error-color); font-size: 13px; margin-top: 4px; display: block; }

/* ===== SUCCESS STATE ===== */
.tec-ext-registration-form.success { border-color: var(--tec-success-color); background: linear-gradient(135deg, var(--tec-success-light) 0%, var(--tec-gray-50) 100%); }
.tec-ext-success-message { text-align: center; padding: 40px 20px; }
.tec-ext-success-message h3 { color: var(--tec-success-color); font-size: 24px; margin-bottom: 15px; }
.tec-ext-success-message p { color: var(--tec-gray-700); font-size: 16px; line-height: 1.6; margin: 0; }

/* ===== RESPONSIVE DESIGN - TABLET ===== */
@media screen and (max-width: 768px) {
    .tec-ext-registration-form { padding: 20px; margin: 15px 0; border-radius: var(--tec-border-radius); }
    .tec-ext-form-row { grid-template-columns: 1fr; gap: 15px; margin-bottom: 15px; }
    .tec-ext-form-header h3 { font-size: 20px; }
    .tec-ext-form-group { margin-bottom: 15px; }
    .tec-ext-form-group input, .tec-ext-form-group textarea { padding: 12px 14px; }
    .tec-ext-submit-btn { width: 100%; padding: 16px; font-size: 16px; }
}

/* ===== RESPONSIVE DESIGN - MOBILE ===== */
@media screen and (max-width: 480px) {
    .tec-ext-registration-form { padding: 15px; margin: 10px 0; }
    .tec-ext-form-header { margin-bottom: 20px; padding-bottom: 15px; }
    .tec-ext-form-header h3 { font-size: 18px; }
    .tec-ext-form-actions { margin-top: 25px; }
}

/* ===== PRINT STYLES ===== */
@media print {
    .tec-ext-registration-form { box-shadow: none; border: 1px solid var(--tec-gray-900); page-break-inside: avoid; }
    .tec-ext-submit-btn { display: none; }
}