/*
 * OBP Stripe - Forms Stylesheet
 * Styles for login and authentication forms
 * Colors sourced from OBP Portal theme (OKLCH color space)
 */

/* Login container */
.login-container {
    max-width: 450px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 40px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 200px;
    max-height: 80px;
    height: auto;
    width: auto;
}

/* Form page body styling */
body.form-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(
        from 180deg at 50% 50%,
        oklch(14.97% 0.03 285.58deg) 0deg,
        oklch(68.5% 0.14 148.36deg) 120deg,
        oklch(14.97% 0.03 285.58deg) 240deg,
        oklch(68.5% 0.14 148.36deg) 360deg
    );
    position: relative;
}

body.form-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(40px);
    z-index: 0;
}

body.form-page > * {
    position: relative;
    z-index: 1;
}

/* Form elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
.form-control:focus {
    outline: none;
    border-color: oklch(68.5% 0.14 148.36deg);
    box-shadow: 0 0 0 3px rgba(104, 211, 145, 0.1);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3e50' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

input::placeholder {
    color: #adb5bd;
}

/* Form labels */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

/* Form buttons */
.form-group button,
form button[type="submit"],
.btn-primary {
    width: 100%;
    background: oklch(68.5% 0.14 148.36deg);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-top: 8px;
}

.form-group button:hover,
form button[type="submit"]:hover,
.btn-primary:hover {
    background: oklch(48.34% 0.09 148.26deg);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(104, 211, 145, 0.3);
}

.form-group button:active,
form button[type="submit"]:active,
.btn-primary:active {
    transform: translateY(0);
}

/* Error messages */
.error {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #ef5350;
    font-size: 0.95rem;
}

/* Info boxes in forms */
.info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    border-left: 4px solid oklch(68.5% 0.14 148.36deg);
}

.info strong {
    color: #2c3e50;
    font-weight: 600;
}

.production-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    border-left: 4px solid oklch(68.5% 0.14 148.36deg);
    text-align: center;
}

.production-info strong {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Hint text */
.hint,
.form-text {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Box for instructions */
.box {
    background: #f8f9fa;
    border-left: 4px solid oklch(68.5% 0.14 148.36deg);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
}

/* Form layout helpers */
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* Top bar for login page */
.top-bar {
    background: oklch(14.97% 0.03 285.58deg);
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.top-bar img {
    max-width: 300px;
    height: auto;
}

/* Main page container */
.main-page {
    max-width: 500px;
    margin: 0 auto;
}

/* Responsive form design */
@media (max-width: 768px) {
    .login-container {
        padding: 30px 20px;
        max-width: 100%;
        margin: 20px;
    }

    .login-logo img {
        max-width: 150px;
        max-height: 60px;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .top-bar {
        padding: 20px 10px;
        margin-bottom: 20px;
    }

    .top-bar img {
        max-width: 200px;
    }

    .main-page {
        padding: 0 10px;
    }
}

/* Large form container for test pages */
.login-container-large {
    max-width: 520px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 40px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Bootstrap form control compatibility */
.form-control:focus {
    outline: none;
    border-color: oklch(68.5% 0.14 148.36deg);
    box-shadow: 0 0 0 3px rgba(104, 211, 145, 0.1);
}

/* Rounded corners for containers */
.rounded-3 {
    border-radius: 0.75rem;
}

.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}
