/* ============================================
   NFC SCANNER STYLES & ANIMATIONS
   ============================================ */

.nfc-scanner-section {
    background-color: var(--color-nfc-bg);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.nfc-scanner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

/* ============================================
   NFC ICON & ANIMATIONS
   ============================================ */

.nfc-icon-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: var(--spacing-sm);
}

.nfc-icon {
    width: 100%;
    height: 100%;
    color: var(--color-icon-blue);
    stroke: var(--color-icon-blue);
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nfc-scanner-section.nfc-scanning .nfc-icon {
    animation: nfc-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes nfc-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.nfc-scanner-section.nfc-success .nfc-icon {
    animation: nfc-success-bounce 0.6s ease-out;
    color: var(--color-success);
    opacity: 1;
}

@keyframes nfc-success-bounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.nfc-scanner-section.nfc-error .nfc-icon {
    animation: nfc-shake 0.5s ease-in-out;
    color: var(--color-error);
}

@keyframes nfc-shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ============================================
   NFC TITLE & SUBTITLE
   ============================================ */

.nfc-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: 0;
}

.nfc-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

.nfc-scanner-section.nfc-scanning .nfc-subtitle {
    animation: blink-text 1s ease-in-out infinite;
}

@keyframes blink-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ============================================
   NFC AVAILABILITY MESSAGE
   ============================================ */

.nfc-availability {
    font-size: 11px;
    color: var(--color-text-secondary);
    margin: var(--spacing-xs) 0 0 0;
}

/* ============================================
   SCANNER STATES
   ============================================ */

/* Idle State */
.nfc-scanner-section.nfc-idle .nfc-title {
    color: var(--color-text-primary);
}

.nfc-scanner-section.nfc-idle .nfc-icon {
    color: var(--color-icon-blue);
}

/* Scanning State */
.nfc-scanner-section.nfc-scanning .nfc-title {
    color: var(--color-icon-blue);
}

.nfc-scanner-section.nfc-scanning .nfc-subtitle {
    color: var(--color-icon-blue);
}

.nfc-scanner-section.nfc-scanning .btn-nfc-scan {
    background-color: var(--color-secondary);
    cursor: not-allowed;
    pointer-events: none;
}

/* Success State */
.nfc-scanner-section.nfc-success {
    background-color: rgba(16, 185, 129, 0.1);
}

.nfc-scanner-section.nfc-success .nfc-title {
    color: var(--color-success);
}

.nfc-scanner-section.nfc-success .nfc-subtitle {
    color: var(--color-success);
}

.nfc-scanner-section.nfc-success .nfc-icon {
    color: var(--color-success);
}

/* Error State */
.nfc-scanner-section.nfc-error {
    background-color: rgba(220, 38, 38, 0.1);
}

.nfc-scanner-section.nfc-error .nfc-title {
    color: var(--color-error);
}

.nfc-scanner-section.nfc-error .nfc-subtitle {
    color: var(--color-error);
}

.nfc-scanner-section.nfc-error .nfc-icon {
    color: var(--color-error);
}

/* Demo State */
.nfc-scanner-section.nfc-demo {
    background: linear-gradient(135deg, var(--color-nfc-bg), rgba(59, 130, 246, 0.05));
}

.nfc-scanner-section.nfc-demo .nfc-icon {
    animation: nfc-demo-bounce 2s ease-in-out infinite;
}

@keyframes nfc-demo-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

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

.nfc-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--color-icon-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   STATUS ICON
   ============================================ */

.nfc-status-icon {
    display: inline-block;
    font-size: 20px;
    margin-right: var(--spacing-sm);
}

/* ============================================
   RETRY BUTTON (Hidden by default)
   ============================================ */

.nfc-retry-button {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: var(--spacing-md);
    display: none;
}

.nfc-retry-button:hover {
    background-color: var(--color-primary-dark);
}

.nfc-scanner-section.nfc-error .nfc-retry-button {
    display: inline-block;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 640px) {
    .nfc-scanner-section {
        padding: var(--spacing-xl);
        margin-bottom: var(--spacing-xl);
    }

    .nfc-icon-wrapper {
        width: 64px;
        height: 64px;
    }

    .nfc-title {
        font-size: var(--font-size-lg);
    }

    .nfc-subtitle {
        font-size: var(--font-size-sm);
    }

    .btn-nfc-scan {
        width: 100%;
    }

    .btn-demo-mode {
        width: 100%;
    }
}

/* ============================================
   TRANSITIONS & EFFECTS
   ============================================ */

.nfc-scanner-section {
    transition: all var(--transition-slow);
}

.nfc-scanner-section.nfc-success {
    animation: success-glow 0.6s ease-out;
}

@keyframes success-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.nfc-scanner-section.nfc-error {
    animation: error-shake 0.5s ease-in-out;
}

@keyframes error-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}
