/**
 * Webinar Manager CSS v1.1.0
 * Stili frontend form di registrazione + admin + addon DCC
 */

/* ============================================================
   FORM REGISTRAZIONE WEBINAR (FRONTEND)
============================================================ */

.webinar-registration-widget {
    max-width: 520px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.webinar-widget-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #6B46C1;
}

.webinar-registration-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.webinar-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.webinar-form-group input[type="text"],
.webinar-form-group input[type="email"],
.webinar-form-group input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1a202c;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.webinar-form-group input:focus {
    outline: none;
    border-color: #6B46C1;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.15);
}

/* ============================================================
   DCC STATUS MESSAGES
============================================================ */

.webinar-dcc-status {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 5px;
    line-height: 1.4;
}

/* ============================================================
   DCC SECTION nel form
============================================================ */

.webinar-dcc-section {
    border: 1px solid #e9d5ff;
    border-radius: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #fdf4ff 0%, #f5f3ff 100%);
    margin-top: 8px;
}

.webinar-dcc-divider {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
}

.webinar-dcc-divider::before,
.webinar-dcc-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #c4b5fd;
}

.webinar-dcc-divider span {
    font-size: 12px;
    font-weight: 700;
    color: #6B46C1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ============================================================
   DCC CHECKBOX RICHIESTAISCRIZIONE
============================================================ */

.webinar-dcc-checkbox-group {
    margin-top: 6px;
}

.webinar-dcc-checkbox-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    padding: 12px;
    background: #fff;
    border-radius: 10px;
    border: 2px solid #e9d5ff;
    transition: border-color 0.2s, background 0.2s;
}

.webinar-dcc-checkbox-label:hover {
    border-color: #6B46C1;
    background: #f9f5ff;
}

.webinar-dcc-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #6B46C1;
    cursor: pointer;
}

.webinar-dcc-checkbox-label span {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.webinar-dcc-checkbox-label small {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
}

.webinar-dcc-info {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

/* ============================================================
   PULSANTI REGISTRAZIONE
============================================================ */

.webinar-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.webinar-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.3;
}

.webinar-btn-primary {
    background: linear-gradient(135deg, #6B46C1, #7C3AED);
    color: #fff;
    box-shadow: 0 4px 14px rgba(107, 70, 193, 0.4);
}

.webinar-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.5);
}

.webinar-btn-secondary {
    background: #fff;
    color: #6B46C1;
    border: 2px solid #6B46C1;
}

.webinar-btn-secondary:hover {
    background: #f5f3ff;
    transform: translateY(-2px);
}

.webinar-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 480px) {
    .webinar-buttons-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   STATISTICHE
============================================================ */

.webinar-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.webinar-stat-item {
    text-align: center;
    padding: 10px;
}

.webinar-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #6B46C1;
    line-height: 1;
}

.webinar-stat-label {
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   LOADING
============================================================ */

.webinar-loading {
    text-align: center;
    padding: 12px;
    color: #6B7280;
    font-size: 14px;
}

.webinar-loading span::before {
    content: '⏳ ';
}

/* ============================================================
   MESSAGGIO DI RISPOSTA
============================================================ */

.webinar-registration-message {
    margin-bottom: 16px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.6;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ADMIN — LAYOUT GENERALE
============================================================ */

.webinar-form-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.webinar-form-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a202c;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

/* Card statistiche admin */
.webinar-admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.webinar-admin-card {
    background: linear-gradient(135deg, #6B46C1, #7C3AED);
    color: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.webinar-admin-card strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.webinar-admin-card span {
    display: block;
    font-size: 12px;
    opacity: 0.85;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tab content margin */
.tab-content {
    margin-top: 20px;
}

/* ============================================================
   ADMIN — DASHBOARD STAT CARDS (Fix #1)
   Classi usate in admin-dashboard.php
============================================================ */

.webinar-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.webinar-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.webinar-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.webinar-stat-card-number {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.webinar-stat-card-label {
    font-size: 12px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* Badge stato registrazione nella tabella admin */
.status-partecipa,
.status-interessato {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-partecipa {
    background: #dcfce7;
    color: #166534;
}

.status-interessato {
    background: #fef9c3;
    color: #854d0e;
}
