/**
 * VVSOutlet BankID Login - Styles
 *
 * @package VVSOutlet_Commerce
 * @since 1.23.0
 */

/* ====================
   BankID Auth Container - Professional Tailwind Style
   ==================== */

.vvso-bankid-auth-container {
    margin: 0;
    padding: 0;
}

/* Auth Block (Login & Registration) */
.vvso-auth-block {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

/* Unified auth block - slightly more prominent */
.vvso-auth-block-unified {
    background: linear-gradient(to bottom, #ffffff, #fafbfc);
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.vvso-auth-block-title {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
}

.vvso-auth-block-desc {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

/* Auth Buttons - Matching bidding modal style */
.vvso-auth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

/* Primary button (blue with white BankID logo) */
.vvso-auth-btn-primary {
    background: linear-gradient(135deg, #005aa0 0%, #003d73 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 90, 160, 0.2);
}

.vvso-auth-btn-primary:hover {
    background: linear-gradient(135deg, #004a8f 0%, #002e5c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 90, 160, 0.3);
}

.vvso-auth-btn-primary:active {
    transform: translateY(0);
}

/* Secondary button (white with border, blue BankID logo) */
.vvso-auth-btn-secondary {
    background: white;
    color: #005aa0;
    border: 2px solid #005aa0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.vvso-auth-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #004080;
    color: #004080;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.vvso-auth-btn-secondary:active {
    transform: translateY(0);
}

/* BankID logo in buttons */
.vvso-bankid-logo {
    height: 24px;
    width: auto;
    flex-shrink: 0;
}

.vvso-bankid-logo-secondary {
    height: 24px;
    width: auto;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(23%) sepia(70%) saturate(2500%) hue-rotate(194deg) brightness(90%) contrast(102%);
}

/* Info text with BankID icon */
.vvso-auth-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    color: #6c757d;
}

.vvso-auth-info svg {
    flex-shrink: 0;
}

/* Divider between blocks */
.vvso-auth-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.vvso-auth-divider span {
    background: #f8f9fa;
    padding: 0 16px;
    color: #adb5bd;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.vvso-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
    z-index: 0;
}

/* Form Group (Email input) */
.vvso-form-group {
    margin-bottom: 16px;
}

.vvso-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.vvso-form-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
    background: white;
    box-sizing: border-box;
}

.vvso-form-input:focus {
    outline: none;
    border-color: #005aa0;
    box-shadow: 0 0 0 3px rgba(0, 90, 160, 0.1);
}

.vvso-form-input::placeholder {
    color: #adb5bd;
}

/* Back link */
.vvso-auth-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    margin-top: 12px;
    font-size: 14px;
    color: #6c757d;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
}

.vvso-auth-link:hover {
    color: #005aa0;
}

/* Register expanded state animation */
.vvso-register-expanded {
    animation: vvsoSlideDown 0.3s ease-out;
}

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

/* ====================
   BankID Modal Overlay
   ==================== */

.vvso-bankid-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====================
   BankID Modal
   ==================== */

.vvso-bankid-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    z-index: 100000;
    animation: vvsoModalFadeIn 0.3s ease-out;
}

@keyframes vvsoModalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Modal Header */
.vvso-bankid-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #005aa0 0%, #003d73 100%);
    color: white;
}

.vvso-bankid-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.vvso-bankid-modal-title svg {
    fill: white;
}

.vvso-bankid-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: white;
    transition: opacity 0.2s;
    border-radius: 4px;
}

.vvso-bankid-modal-close:hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Body */
.vvso-bankid-modal-body {
    padding: 32px 24px;
    min-height: 300px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* ====================
   BankID Screens
   ==================== */

.vvso-bankid-screen {
    display: none;
    text-align: center;
}

.vvso-bankid-screen h3 {
    font-size: 20px;
    color: #212529;
    margin-bottom: 12px;
    font-weight: 600;
}

.vvso-bankid-screen p {
    font-size: 15px;
    color: #6c757d;
    line-height: 1.6;
}

/* Loading Screen */
.vvso-bankid-loading-spinner {
    margin: 40px auto;
}

.vvso-spinner {
    width: 64px;
    height: 64px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #005aa0;
    border-radius: 50%;
    animation: vvsoSpin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes vvsoSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Verification Screen */
.vvso-bankid-qr-container {
    margin: 24px auto;
    padding: 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.vvso-bankid-qr-code {
    width: 200px;
    height: 200px;
    display: block;
}

.vvso-bankid-instructions {
    margin: 24px 0;
}

.vvso-bankid-mobile-launch {
    margin: 24px 0;
}

.vvso-bankid-or-text {
    font-size: 14px;
    color: #adb5bd;
    margin: 16px 0 12px;
    position: relative;
}

.vvso-bankid-or-text::before,
.vvso-bankid-or-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #dee2e6;
}

.vvso-bankid-or-text::before {
    left: 0;
}

.vvso-bankid-or-text::after {
    right: 0;
}

.vvso-bankid-mobile-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #005aa0;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s, transform 0.2s;
}

.vvso-bankid-mobile-btn:hover {
    background: #004080;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* Progress bar */
.vvso-bankid-progress {
    margin-top: 32px;
}

.vvso-bankid-progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.vvso-bankid-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #005aa0, #0077cc);
    border-radius: 3px;
    transition: width 0.3s ease;
    animation: vvsoProgressPulse 2s ease-in-out infinite;
}

@keyframes vvsoProgressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.vvso-bankid-progress-text {
    font-size: 13px;
    color: #868e96;
}

/* Cancel button */
.vvso-bankid-cancel-btn {
    margin-top: 24px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.vvso-bankid-cancel-btn:hover {
    border-color: #adb5bd;
    color: #495057;
    background: #f8f9fa;
}

/* Success Screen */
.vvso-bankid-success-icon {
    margin: 24px auto;
}

.vvso-bankid-success-icon svg {
    animation: vvsoSuccessPop 0.5s ease-out;
}

@keyframes vvsoSuccessPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.vvso-bankid-success-redirect {
    margin-top: 24px;
    padding: 16px;
    background: #d1f4e0;
    border-radius: 8px;
}

.vvso-bankid-success-redirect p {
    margin: 0;
    font-size: 14px;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vvso-bankid-success-redirect p::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #10b981;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: vvsoSpin 0.6s linear infinite;
}

/* Error Screen */
.vvso-bankid-error-icon {
    margin: 24px auto;
}

.vvso-bankid-error-icon svg {
    animation: vvsoErrorShake 0.5s ease-out;
}

@keyframes vvsoErrorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.vvso-bankid-retry-btn {
    margin-top: 24px;
    padding: 14px 32px;
    background: #005aa0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.vvso-bankid-retry-btn:hover {
    background: #004080;
    transform: translateY(-2px);
}

/* ====================
   BankID Info Modal Styles
   ==================== */

.vvso-bankid-info-content {
    padding: 20px;
}

.vvso-bankid-info-icon {
    text-align: center;
    margin-bottom: 20px;
}

.vvso-bankid-info-features {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.vvso-bankid-info-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #495057;
}

.vvso-bankid-info-feature:last-child {
    margin-bottom: 0;
}

.vvso-bankid-info-feature svg {
    flex-shrink: 0;
}

/* ====================
   Mobile Responsive
   ==================== */

@media (max-width: 600px) {
    .vvso-bankid-modal {
        width: 95%;
        max-width: none;
        border-radius: 12px;
    }

    .vvso-bankid-modal-body {
        padding: 24px 16px;
    }

    .vvso-bankid-qr-code {
        width: 180px;
        height: 180px;
    }

    .vvso-bankid-screen h3 {
        font-size: 18px;
    }

    .vvso-bankid-screen p {
        font-size: 14px;
    }
}

/* ====================
   BankID Logo Color
   ==================== */

.vvsoutlet-azm-mobile-account-btn .vvso-bankid-icon {
    fill: white;
}

.vvsoutlet-azm-mobile-account-btn-secondary .vvso-bankid-icon {
    fill: #005aa0;
}

/* ====================
   Email Collection Form
   ==================== */

.vvso-bankid-email-form {
    margin-top: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.vvso-bankid-email-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.vvso-bankid-email-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.vvso-bankid-email-input:focus {
    outline: none;
    border-color: #005aa0;
    box-shadow: 0 0 0 3px rgba(0, 90, 160, 0.1);
}

.vvso-bankid-email-submit {
    width: 100%;
    padding: 14px 20px;
    background: #005aa0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.vvso-bankid-email-submit:hover {
    background: #004080;
}

.vvso-bankid-email-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ====================
   Animation Utilities
   ==================== */

.vvso-fade-in {
    animation: vvsoFadeIn 0.3s ease-out;
}

@keyframes vvsoFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.vvso-slide-up {
    animation: vvsoSlideUp 0.3s ease-out;
}

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