/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5 url('bkg.png') no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

@media (max-width: 768px) {
    body {
        padding: 0;
        align-items: stretch;
        min-height: 100vh;
    }
}

.container {
    width: 100%;
    max-width: 420px;
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 600px;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        margin: 0;
    }
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.lowell-logo {
    display: flex;
    align-items: center;
}

.lowell-logo-img {
    height: 40px;
    width: auto;
}

.bankid-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.logo-svg {

}

/* Main Content */
.main-content {
    padding: 0;
}

.form-container {
    background: #efe7ff;
    margin: 0;
    border-radius: 0;
    padding: 10px 32px;
    min-height: 500px;
    position: relative;
}

.form-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
}

.form-title {
    font-size: 25px;
    font-weight: 700;
    color: #39134c;
    margin: 0;
    letter-spacing: -0.5px;
    text-align: center;
}

.info-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #39134c;
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
}

/* Form Body */
.form-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.question-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.question {
    font-size: 18px;
    font-weight: 600;
    color: #39134c;
    margin: 0;
    text-align: center;
}

.question-icon {
    width: 20px;
    height: 20px;
    color: #39134c;
    cursor: pointer;
    transition: color 0.3s ease;
}

.question-icon:hover {
    color: #cccccc;
}

/* Input Container */
.input-container {
    position: relative;
    margin: 8px 0 2px 0;
}

.user-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 2;
    pointer-events: none;
}

.birth-number-input {
    width: 100%;
    height: 56px;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0 16px 0 48px;
    font-size: 18px;
    color: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.birth-number-input::placeholder {
    color: #999;
    font-size: 16px;
}

.birth-number-input:focus {
    border-color: #39134c;
    background: #4d395c;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.birth-number-input:valid {
    border-color: #ffffff;
}

.helper-text {
    font-size: 14px;
    color: #39134c;
    margin: 0;
    margin-bottom: 32px;
    text-align: left;
}

/* Button */
.next-button {
    width: 100%;
    min-height: 56px;
    background-color: #39134c;
    border: none;
    border-radius: 999px;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.17;
    cursor: pointer;
    transition: opacity 0.15s ease-in-out, background-color 0.15s ease-in-out, color 0.15s ease-in-out;
    margin-top: 0;
    position: relative;
    text-align: center;
    white-space: nowrap;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-button:not(:disabled):hover {
    background-color: rgb(192, 159, 255);
    color: #000000;
    box-shadow: 0 4px 12px rgba(192, 159, 255, 0.3);
}

.next-button:not(:disabled):active {
    background-color: #000000;
}

.next-button:not(:disabled):focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.next-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Footer */
.footer {
    padding: 20px 32px;
    text-align: center;
    background: #f5f5f5;
    border-top: 1px solid #f0f0f0;
}

.powered-by-logo {
    height: 16px;
    width: auto;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        max-width: 100%;
        border-radius: 16px;
    }
    
    .header {
        padding: 20px 24px;
    }
    
    .form-container {
        padding: 32px 24px;
    }
    
    .form-title {
        font-size: 28px;
    }
    
    .question {
        font-size: 16px;
    }
    
    .birth-number-input {
        font-size: 16px;
        height: 52px;
    }
    
    .next-button {
        height: 52px;
        font-size: 16px;
    }
    
}

@media (max-width: 360px) {
    .header {
        padding: 16px 20px;
    }
    
    .form-container {
        padding: 24px 20px;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .question {
        font-size: 15px;
    }
}

/* Loading and Success States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .next-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.success {
    border-color: #4CAF50 !important;
    background: rgb(57, 19, 76) !important;
}

.error {
    border-color: #f44336 !important;
    background: rgba(244, 67, 54, 0.1) !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.next-button:focus,
.birth-number-input:focus,
.info-icon:focus,
.question-icon:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Form styles for additional forms */
.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #39134c;
    font-size: 16px;
}

.input-group input,
.input-group select {
    width: 100%;
    height: 56px;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0 16px;
    font-size: 18px;
    color: #000000;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input::placeholder,
.input-group select::placeholder {
    color: #999;
    font-size: 16px;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #ffffff;
    background: #4d395c;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.input-group select {
    cursor: pointer;
}

.input-group select option {
    background: #333333;
    color: #ffffff;
}

/* Hide waiting status on all pages */
.waiting-status {
    display: none !important;
}