/* ============================================
 * GAM AUTH - Stili per form di login/registrazione
 * ============================================ */

.gam-auth-wrapper {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.gam-auth-wrapper * {
    box-sizing: border-box;
}

.gam-card {
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 2rem;
    margin-bottom: 20px;
}

.gam-card-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 8px;
    text-align: left;
}

.gam-card-subtitle {
    color: #64748b;
    margin-bottom: 28px;
    font-size: 0.95rem;
    text-align: left;
}

.gam-input-wrapper {
    position: relative;
    margin-bottom: 18px;
}

.gam-input {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1E293B;
    padding: 12px 14px;
    line-height: 1.4;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gam-input:focus {
    outline: none;
    border-color: #2A6EF2;
    box-shadow: 0 0 0 3px rgba(42, 110, 242, 0.1);
}

.gam-input::placeholder {
    color: #9ca3af;
}

.gam-input-password {
    padding-right: 48px !important;
}

.gam-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.gam-toggle-password:hover {
    color: #2A6EF2;
    background: #f8fafc;
}

.gam-toggle-password svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.gam-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.gam-select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1E293B;
    padding: 12px 14px;
    line-height: 1.4;
    margin-bottom: 18px;
}

.gam-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    background-color: #2A6EF2;
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    border: none;
    margin-top: 24px;
    transition: background-color 0.2s;
}

.gam-btn:hover {
    background-color: #1a5ad9;
}

.gam-link {
    color: #2A6EF2;
    text-decoration: none;
    font-weight: 500;
}

.gam-link:hover {
    text-decoration: underline;
}

.gam-errors {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #991B1B;
}

.gam-errors ul {
    margin: 0;
    padding-left: 20px;
}

.gam-info {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #1E40AF;
}

.gam-footer-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

.gam-fattura-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.gam-section-title {
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 16px;
    font-size: 1rem;
}

.gam-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 16px 0;
}

.gam-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2A6EF2;
    margin: 0;
}

.gam-radio-group {
    display: flex;
    gap: 24px;
    margin: 16px 0;
}

.gam-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.gam-radio-group input[type="radio"] {
    accent-color: #2A6EF2;
    margin: 0;
}

.gam-forgot-link {
    text-align: right;
    margin: -8px 0 16px;
}

.gam-message-card {
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 2rem;
    text-align: center;
    color: #1E293B;
}

/* Checkout */
.gam-checkout-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gam-checkout-form {
    flex: 1;
    min-width: 320px;
}

.gam-checkout-summary {
    flex: 0 0 350px;
}

.gam-checkout-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
    gap:2px
}

.gam-tab {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    background-color:green;
    color: white;
    border-bottom: none !important;
    background-color: #cccccc !important;
}


.gam-tab:hover{
    color: white !important;
    border-bottom-color: #2A6EF2 !important;
    background-color: #2A6EF2 !important;
}

.gam-tab.active {
    color: white !important;
    border-bottom-color: #2A6EF2 !important;
    background-color: #2A6EF2 !important;
}

.gam-checkout-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.gam-checkout-welcome {
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.gam-checkout-forgot {
    text-align: center;
    margin-top: 16px;
}

/* Pulsante acquisto */
.gam-purchase-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    margin: 30px 0;
    border: 1px solid #f0f0f0;
}

.gam-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 8px;
}

.gam-price-info {
    color: #64748b;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.gam-purchase-button {
    display: block;
    background: #2A6EF2;
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.gam-purchase-button:hover {
    background: #1a5ad9;
    color: #fff;
}

.gam-login-link {
    margin-top: 18px;
    font-size: 0.9rem;
    color: #64748b;
}

.gam-login-link a {
    color: #2A6EF2;
    text-decoration: none;
}

.gam-access-granted {
    background: #10b981;
    color: #fff;
    padding: 16px;
    text-align: center;
    border-radius: 8px;
    margin: 20px 0;
}

.gam-access-granted a {
    color: #fff;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .gam-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .gam-card {
        padding: 1.5rem;
    }
    
    .gam-checkout-container {
        flex-direction: column;
    }
    
    .gam-checkout-summary {
        flex: 1;
    }
    
    .gam-checkout-form {

    min-width:auto;
}
.gam-checkout-container{

    padding:0px;
}
}


/* ============================================
 * FIX PRIORITÀ - Sovrascrive tema ed Elementor
 * ============================================ */



/* Toggle password - priorità massima */
.gam-toggle-password,
.gam-auth-wrapper .gam-toggle-password,
body .gam-toggle-password,
body .gam-auth-wrapper .gam-toggle-password {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    border-radius: 4px !important;
    width: 32px !important;
    height: 32px !important;
    z-index: 10 !important;
    box-shadow: none !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.gam-toggle-password:hover,
.gam-auth-wrapper .gam-toggle-password:hover {
    color: #2A6EF2 !important;
    background: #f8fafc !important;
}

.gam-toggle-password svg,
.gam-auth-wrapper .gam-toggle-password svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    pointer-events: none !important;
}

/* Input password - spazio per il toggle */
.gam-input-password,
.gam-auth-wrapper .gam-input-password,
body .gam-input-password {
    padding-right: 48px !important;
}

/* Input wrapper - contenitore relativo */
.gam-input-wrapper,
.gam-auth-wrapper .gam-input-wrapper {
    position: relative !important;
}

/* ============================================
 * PROFILO UTENTE - DESIGN MODERNO
 * ============================================ */

.gam-profilo-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* HEADER */
.gam-profilo-header {
    background: #0073B6;
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.gam-profilo-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(42,110,242,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.gam-profilo-header-top {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.gam-profilo-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.gam-avatar-img {
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.2);
    width: 100px;
    height: 100px;
}

.gam-avatar-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border: 3px solid #0f172a;
    border-radius: 50%;
}

.gam-profilo-header-info {
    flex: 1;
}

.gam-profilo-header-info h1 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

.gam-profilo-email,
.gam-profilo-iscritto {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.gam-profilo-email svg,
.gam-profilo-iscritto svg {
    flex-shrink: 0;
}

.gam-btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #2A6EF2;
    color: #fff !important;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.gam-btn-logout:hover {
    background: rgba(239,68,68,0.3);
    border-color: rgba(239,68,68,0.5);
    color: #fca5a5;
}

/* STATS */
.gam-profilo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
    position: relative;
    z-index: 1;
}

.gam-stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.gam-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gam-stat-info {
    display: flex;
    flex-direction: column;
}

.gam-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.gam-stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

/* ALERTS */
.gam-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.gam-alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.gam-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.gam-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.gam-alert-error p {
    margin: 0 0 4px 0;
}

.gam-alert-error p:last-child {
    margin-bottom: 0;
}

/* TABS */
.gam-profilo-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.gam-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s;
}

.gam-tab.active {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gam-tab:hover:not(.active) {
    color: #334155;
    background: rgba(255,255,255,0.5);
}

.gam-tab svg {
    flex-shrink: 0;
}

.gam-tab-panel {
    display: none;
}

.gam-tab-panel.active {
    display: block;
}

/* CARDS */
.gam-profilo-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 10px 40px rgba(0,0,0,0.06);
}

.gam-card-header {
    margin-bottom: 32px;
}

.gam-card-header h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 700;
}

.gam-card-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* FORM ELEMENTS */
.gam-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.gam-input-wrapper {
    margin-bottom: 20px;
}

.gam-input-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gam-input-icon {
    position: relative;
}

.gam-input-icon svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.gam-input-icon .gam-input {
    padding-left: 44px;
}

.gam-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.3s;
    background: #fff;
    box-sizing: border-box;
}

.gam-input:focus {
    outline: none;
    border-color: #2A6EF2;
    box-shadow: 0 0 0 4px rgba(42,110,242,0.1);
}

.gam-input::placeholder {
    color: #94a3b8;
}

.gam-input:read-only {
    background: #f8fafc;
    color: #64748b;
}

.gam-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.gam-select:focus {
    outline: none;
    border-color: #2A6EF2;
    box-shadow: 0 0 0 4px rgba(42,110,242,0.1);
}

/* TOGGLE GROUP */
.gam-toggle-group {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
}

.gam-toggle {
    flex: 1;
    padding: 10px 20px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    color: #64748b;
    transition: all 0.3s;
}

.gam-toggle.active {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gam-toggle input[type="radio"] {
    display: none;
}

.gam-toggle:hover:not(.active) {
    color: #334155;
}

/* PASSWORD TIPS */
.gam-password-tips {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.gam-password-tips p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #854d0e;
    font-size: 0.9rem;
}

.gam-password-tips ul {
    margin: 0;
    padding-left: 20px;
    color: #a16207;
    font-size: 0.85rem;
}

.gam-password-tips li {
    margin-bottom: 4px;
}

/* BUTTONS */
.gam-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #f1f5f9;
    color: #334155;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.gam-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.gam-btn-primary {
    background: #2A6EF2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(42,110,242,0.3);
}

.gam-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 20px rgba(42,110,242,0.4);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .gam-profilo-header {
        padding: 24px;
    }
    
    .gam-profilo-header-top {
        flex-direction: column;
        text-align: center;
    }
    
    .gam-profilo-header-info h1 {
        font-size: 1.4rem;
    }
    
    .gam-profilo-stats {
        grid-template-columns: 1fr;
    }
    
    .gam-form-grid {
        grid-template-columns: 1fr;
    }
    
    .gam-profilo-card {
        padding: 24px;
    }
    
    .gam-tab {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .gam-tab span {
        display: none;
    }
}

@media (max-width: 480px) {
    .gam-profilo-tabs {
        flex-direction: column;
        gap: 2px;
    }
}

/* ============================================
 * VALIDAZIONE ERRORI
 * ============================================ */

.gam-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.1) !important;
}

.gam-input-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.2) !important;
}

.gam-field-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: slideDown 0.3s ease;
}

.gam-field-error::before {
    content: '⚠';
    font-size: 0.9rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner animato */
@keyframes gam-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gam-spinner {
    animation: gam-spin 1s linear infinite;
}

/* Alert animazione */
.gam-alert {
    transition: opacity 0.5s ease;
}

/* Bottone disabilitato */
.gam-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Messaggio di errore login più visibile */
.gam-auth-wrapper .gam-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.gam-auth-wrapper .gam-errors ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gam-auth-wrapper .gam-errors li {
    color: #991b1b;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Testo prima delle checkbox */
.gam-checkout-testo-prima {
margin-top: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

/* Testo nel riepilogo */
.gam-checkout-testo-riepilogo {
    padding: 12px 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.gam-checkout-docente{
margin-top: 16px;
    
}