*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: #eee;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, sans-serif;
}
.card {
    width: clamp(280px, 90vw, 340px);
    padding: 24px;
    background: #f5f0ff;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Styling for Text-Based BankID Logo */
.brand-logo-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px; /* Adjusted margin to match image spacing */
    /* gap: 8px; Removed as icon is gone */
}

/* Removed .brand-icon-bars and .brand-icon-bars .bar styles */

.brand-text-styled {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        "Open Sans",
        "Helvetica Neue",
        sans-serif;
    font-size: 1.5rem; /* Reduced size */
    font-weight: bold;
    letter-spacing: -0.5px;
}

.brand-part-bank {
    color: #3d2246; /* Single color for the whole text */
}

.brand-part-id {
    color: #3d2246; /* Single color for the whole text */
}
/* End of Text-Based BankID Logo Styling */

/* Commenting out the old .logo style as it's confirmed unused
.logo{
  width:48px;
}
*/

h1 {
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    color: #333;
    font-weight: bold;
}
.subtitle {
    font-size: 0.9rem;
    color: #333;
    margin: 0 0 24px;
}
.label {
    text-align: left;
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 1rem;
}
.input-wrapper {
    position: relative;
    margin-bottom: 4px;
}
/* Removed .icon class and adjusted input padding below */
input {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    color: #333;
}
.input-helper {
    font-size: 0.8rem;
    color: #333;
    text-align: left;
    margin-bottom: 16px;
    margin-top: 4px;
}
.btn {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    background: #eaddff;
    border: none;
    border-radius: 24px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    font-weight: 500;
}

/* Styling for OTP-valg (Oppgave 1) */
.otp-choice-container {
    margin-top: 8px;
}

.styled-otp-btn {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    background-color: #eaddff;
    border: none;
    border-radius: 24px;
    font-size: 1rem;
    color: #333;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
}

.styled-otp-btn:last-child {
    margin-bottom: 0;
}

.styled-otp-btn .arrow-icon {
    display: none;
}
/* Slutt på styling for OTP-valg */

.back,
.auth-back-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.9rem;
    color: #6a0dad;
    text-decoration: underline;
    cursor: pointer;
}

/* Styling for Autentiseringsvisning og Spinner (Oppgave 2) */
.auth-view {
    text-align: center;
    padding: 20px;
}

.auth-suptitle {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 4px;
}

.auth-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 4px;
    font-weight: bold;
}

.auth-subtitle {
    font-size: 1rem;
    color: #333;
    margin-bottom: 20px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

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

.card-details-row {
    display: flex;
    gap: 16px;
    margin-bottom: 4px;
}

.card-details-row .input-wrapper {
    flex: 1;
    margin-bottom: 0px;
}

/* New Spinner and Success Message Styles */
.purple-spinner {
    width: 40px;
    height: 40px;
    border: 5px solid rgba(106, 13, 173, 0.2);
    border-top-color: #6a0dad; /* Main purple color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

.success-message {
    text-align: center;
    padding: 20px 0;
}

.success-message p {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 375px) {
    .card {
        padding: 20px;
    }

    /* Adjustments for text logo on mobile */
    .brand-logo-text-container {
        margin-bottom: 16px; /* Adjusted mobile margin */
    }
    /* Removed .brand-icon-bars .bar mobile styles */
    .brand-text-styled {
        font-size: 1.3rem; /* Reduced mobile size */
    }
    /* End of text logo adjustments */

    h1 {
        font-size: 1.5rem;
    }
    .label {
        font-size: 0.9rem;
    }
    .subtitle {
        font-size: 0.8rem;
    }
    input,
    .btn,
    .styled-otp-btn {
        font-size: 0.9rem;
        padding: 12px; /* Ensures padding is consistent */
    }
    .input-helper {
        font-size: 0.75rem;
    }
    /* Remove or comment out .logo specific mobile styles if .logo class is fully removed from HTML */
    /* For example, if this was still there from previous changes:
  .logo {
    width: 40px;
  }
  */
}
