/* ============================================
   GRUPPO ORSO - Fidelity Card System
   Stili estratti da index.html
   ============================================ */

/* ============================================
   PHONE INPUT
   ============================================ */
.phone-input-group {
    display: flex;
    gap: 8px;
}

.phone-prefix {
    width: 110px;
    flex-shrink: 0;
}

.phone-number {
    flex: 1;
}

/* ============================================
   FIDELITY HOME BUTTON
   ============================================ */
.fidelity-home-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #1a4d4d 0%, #2c5f5f 100%);
    color: white;
    padding: 18px 20px;
    border-radius: 16px;
    margin-top: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 77, 77, 0.3);
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.fidelity-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 77, 0.4);
}

.fidelity-home-btn:active {
    transform: translateY(0);
}

.fidelity-icon {
    font-size: 32px;
}

.fidelity-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fidelity-text strong {
    font-size: 1.1rem;
}

.fidelity-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ============================================
   FIDELITY SECTION LAYOUT
   ============================================ */
.fidelity-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a4d4d 0%, #2c5f5f 100%);
    padding: 20px;
}

.fidelity-container {
    max-width: 500px;
    margin: 0 auto;
}

.fidelity-header {
    text-align: center;
    padding: 30px 0;
    color: white;
}

.fidelity-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.fidelity-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.fidelity-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: rgba(255,255,255,0.15);
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.fidelity-back-btn:hover {
    background: rgba(255,255,255,0.25);
}

/* ============================================
   FIDELITY VIEWS & ANIMATIONS
   ============================================ */
.fidelity-view {
    display: none;
    animation: fidelityFadeIn 0.4s ease;
}

.fidelity-view.active {
    display: block;
}

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

/* ============================================
   FIDELITY MENU CARDS
   ============================================ */
.fidelity-menu-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.fidelity-menu-card {
    background: white;
    border-radius: 20px;
    padding: 35px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.fidelity-menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.fidelity-menu-card .fid-icon {
    font-size: 50px;
}

.fidelity-menu-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: #1a4d4d;
}

.fidelity-menu-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* ============================================
   FIDELITY CARD (Form Container)
   ============================================ */
.fidelity-card {
    background: white;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-top: 20px;
}

.fidelity-card h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: #1a4d4d;
    margin-bottom: 20px;
    text-align: center;
}

/* ============================================
   FIDELITY FORMS
   ============================================ */
.fid-form-group {
    margin-bottom: 20px;
}

.fid-form-group label {
    display: block;
    color: #1a4d4d;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.fid-form-group .required {
    color: #dc3545;
}

.fid-form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e8eef3;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.fid-form-group input:focus {
    outline: none;
    border-color: #1a4d4d;
    box-shadow: 0 0 0 4px rgba(26, 77, 77, 0.1);
}

/* ============================================
   FIDELITY BUTTONS
   ============================================ */
.fid-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fid-btn-primary {
    background: linear-gradient(135deg, #1a4d4d 0%, #2c5f5f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 77, 77, 0.3);
}

.fid-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 77, 0.4);
}

.fid-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.fid-btn-secondary {
    background: #f8f9fa;
    color: #1a4d4d;
    margin-top: 15px;
}

.fid-btn-secondary:hover {
    background: #e8eef3;
}

/* ============================================
   FIDELITY ALERTS
   ============================================ */
.fid-alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.fid-alert.show {
    display: block;
    animation: fidelityFadeIn 0.3s ease;
}

.fid-alert.error {
    background: #fee2e2;
    color: #dc2626;
}

.fid-alert.success {
    background: #d1fae5;
    color: #059669;
}

/* ============================================
   FIDELITY LOADING
   ============================================ */
.fid-loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.fid-loading.show {
    display: block;
}

.fid-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e8eef3;
    border-top-color: #1a4d4d;
    border-radius: 50%;
    animation: fidSpin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes fidSpin {
    to { transform: rotate(360deg); }
}

.fid-loading p {
    color: #666;
    font-size: 1rem;
}

/* ============================================
   PUNTI RESULT
   ============================================ */
.fid-punti-result {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.fid-punti-result.show {
    display: block;
}

.fid-punti-value {
    font-size: 4rem;
    font-weight: 700;
    color: #1a4d4d;
    line-height: 1;
}

.fid-punti-label {
    font-size: 1.2rem;
    color: #666;
    margin-top: 5px;
}

.fid-punti-cliente {
    font-size: 1.1rem;
    color: #1a4d4d;
    margin-top: 20px;
    font-weight: 600;
}

.fid-punti-card {
    font-size: 0.9rem;
    color: #888;
    margin-top: 5px;
    font-family: monospace;
}

/* ============================================
   SUCCESS BOX
   ============================================ */
.fid-success-box {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.fid-success-box.show {
    display: block;
}

.fid-success-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.fid-success-box h3 {
    color: #059669;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.fid-card-code {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.fid-card-code-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

.fid-card-code-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a4d4d;
    font-family: monospace;
    letter-spacing: 2px;
}

/* ============================================
   WALLET BUTTONS
   ============================================ */
.fid-wallet-buttons {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.fid-wallet-buttons.show {
    display: flex;
}

.fid-wallet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    background: #000;
    color: #fff;
    transition: all 0.3s ease;
}

.fid-wallet-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ============================================
   INFO BOX
   ============================================ */
.fid-info-box {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    padding: 15px;
    border-radius: 0 12px 12px 0;
    margin-top: 20px;
}

.fid-info-box p {
    color: #0369a1;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   PREMI LINK
   ============================================ */
.fid-premi-link {
    text-align: center;
    margin-top: 30px;
}

.fid-premi-link a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.fid-premi-link a:hover {
    background: rgba(255,255,255,0.2);
}

/* ============================================
   FIDELITY FOOTER
   ============================================ */
.fid-footer {
    text-align: center;
    padding: 30px 0;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.fid-footer p {
    margin-bottom: 5px;
}

/* ============================================
   REWARDS SECTION
   ============================================ */
.rewards-section {
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
}

.rewards-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: #1a4d4d;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
}

.rewards-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* ============================================
   REWARD CARDS
   ============================================ */
.reward-card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 3px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reward-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.reward-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Reward Levels */
.level-1 { border-color: #90caf9; }
.level-1::before { background: linear-gradient(90deg, #64b5f6 0%, #42a5f5 100%); }

.level-2 { border-color: #a5d6a7; }
.level-2::before { background: linear-gradient(90deg, #66bb6a 0%, #4caf50 100%); }

.level-3 { border-color: #ffcc80; }
.level-3::before { background: linear-gradient(90deg, #ffa726 0%, #ff9800 100%); }

.level-4 { border-color: #ce93d8; }
.level-4::before { background: linear-gradient(90deg, #ba68c8 0%, #ab47bc 100%); }

.reward-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.reward-level {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a4d4d;
}

.reward-points {
    background: linear-gradient(135deg, #1a4d4d 0%, #2c5f5f 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(26, 77, 77, 0.3);
}

.reward-content h4 {
    color: #1a4d4d;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.reward-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.reward-list li {
    padding: 10px 12px 10px 35px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.9rem;
    position: relative;
}

.reward-list li::before {
    content: '✓';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #4caf50;
    font-weight: bold;
    font-size: 1.1rem;
}

/* ============================================
   REWARD GADGET
   ============================================ */
.reward-gadget {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ffb74d;
    border-radius: 12px;
    margin-top: 12px;
}

.gadget-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.reward-gadget strong {
    color: #e65100;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ============================================
   PROMO INFO
   ============================================ */
.promo-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
    margin: 20px 0;
    border-left: 4px solid #1a4d4d;
}

.promo-info p {
    color: #1a4d4d;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.promo-info ul {
    margin: 0;
    padding-left: 18px;
    color: #666;
    line-height: 1.8;
}

.promo-info li {
    margin-bottom: 6px;
    font-size: 0.85rem;
}

/* ============================================
   RICHIEDI PREMIO SECTION
   ============================================ */
.richiedi-premio-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e8eef3;
}

.richiedi-premio-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.richiedi-premio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.45);
}

/* ============================================
   PREMIO SELECT
   ============================================ */
.premio-select-container {
    margin-top: 20px;
}

.premio-select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e8eef3;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a4d4d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.premio-select:focus {
    outline: none;
    border-color: #1a4d4d;
    box-shadow: 0 0 0 4px rgba(26, 77, 77, 0.1);
}

.premio-select option {
    padding: 12px;
}

.premio-select option:disabled {
    color: #999;
}

/* ============================================
   CODICE RITIRO
   ============================================ */
.codice-ritiro-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe082 100%);
    border: 3px dashed #ffc107;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    margin: 20px 0;
}

.codice-ritiro-label {
    font-size: 0.9rem;
    color: #856404;
    margin-bottom: 10px;
}

.codice-ritiro-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #856404;
    letter-spacing: 3px;
    font-family: monospace;
}

/* ============================================
   PUNTI SCALATI INFO
   ============================================ */
.punti-scalati-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
}

.punti-scalati-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9rem;
}

.punti-scalati-info strong {
    color: #1a4d4d;
}
