@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap");

:root {
    --Pink: #e15480;
    --PinkLight: #f8edf0;
    --GrayLight: #f7f7f7;
    --Blue: #04a1eb;
    --ErrorBg: #fff0f0;
    --ErrorText: #d85a5a;
    --ErrorBorder: #ffd7d7;
    --SuccessBg: #e8f5e9;
    --SuccessText: #2e7d32;
    --SuccessBorder: #a5d6a7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.container {
    display: flex;
    min-height: 100vh;
}

.image-side {
    flex: 1;
    background-image: url("/images/auth-bg.jpg");
    background-size: cover;
    background-position: center;
    position: sticky;
    top: 0;
    height: 100vh;
}

.login-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--GrayLight);
    padding: 2rem;
    width: 100%;
    min-width: 0;
}

.logo {
    margin-bottom: 2rem;
    max-width: 150px;
    width: 100%;
}

.login-form,
.checkout-form {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-width: 0;
}

.vat-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.vat-status {
    font-size: 0.8rem;
    color: #666;
}

h2 {
    color: var(--Pink);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.login-instruction,
.subscription-info {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.price-box {
    background-color: var(--PinkLight);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.price {
    font-size: 1.8rem;
    color: var(--Pink);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.price-period {
    color: #666;
    font-size: 0.9rem;
}

/* Form overlay styles */
.form-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.form-overlay.active {
    display: flex;
}

.form-overlay .spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.form-overlay .loading-text {
    margin-top: 1rem;
    color: black;
    font-weight: 500;
}

.price-loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 1rem;
}

.price-loading-overlay.active {
    display: flex;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--PinkLight);
    border-radius: 50%;
    border-top-color: var(--Pink);
    animation: spin 1s linear infinite;
}

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

/* Form styles */
.form-group,
.login-form > form > div {
    /* This targets both login and register form fields */
    margin-bottom: 1rem;
}

.form-group label,
.login-form > form > div > label {
    display: block;
    margin-bottom: 0.5rem;
    color: #444;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.login-form > form > div > input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: "Quicksand", sans-serif;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.login-form > form > div > input:focus {
    outline: none;
    border-color: var(--Blue);
}

/* Choices.js custom styling */
.choices {
    margin-bottom: 0;
}

.choices__inner {
    padding: 0.6rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    min-height: auto;
    background: #fff;
}

.choices__input {
    background: #fff;
}

.choices__list--dropdown {
    border-color: #ddd;
}

.choices__list--dropdown .choices__item--selectable {
    padding-right: 0.6rem;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: var(--Blue) !important;
    color: white;
}

.business-fields {
    display: none;
    padding: 1rem;
    background-color: var(--GrayLight);
    border-radius: 5px;
    margin-bottom: 1rem;
}

.business-fields.active {
    display: block;
}

/* iOS Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 2.2rem;
    height: 1.2rem;
    margin-right: 0.4rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ddd;
    transition: 0.3s;
    border-radius: 1.8rem;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 1rem;
    width: 1rem;
    left: 0.1rem;
    bottom: 0.1rem;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--Pink);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(1rem);
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: #444;
    font-weight: 500;
}

button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--Blue);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: "Quicksand", sans-serif;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

button:hover {
    background-color: var(--Pink);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.alert {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.alert-error {
    background-color: var(--ErrorBg);
    color: var(--ErrorText);
    border: 1px solid var(--ErrorBorder);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background-color: var(--SuccessBg);
    color: var(--SuccessText);
    border: 1px solid var(--SuccessBorder);
}

.alert-grey {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

/* Logged in notice with button */
.logged-in-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logged-in-notice span {
    font-weight: 500;
}

.btn-my-obeya {
    background-color: var(--Pink);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.btn-my-obeya:hover {
    background-color: #c74468;
}

.back-to-login {
    margin-top: 1rem;
    text-align: center;
}

.back-to-login a {
    color: var(--Blue);
    text-decoration: none;
    font-size: 0.9rem;
}

.loading-text {
    color: black;
    font-size: 0.8rem;
    margin-top: 0.8rem;
    text-align: center;
    line-height: 1.4;
}

/* Responsive styles for login */
@media (max-width: 1024px) {
    .login-form,
    .checkout-form {
        max-width: 90vw;
        width: 100%;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .image-side {
        height: 30vh;
        position: relative;
        min-height: 180px;
        max-height: 250px;
    }

    .login-side {
        min-height: 70vh;
        padding: 1.5rem;
    }

    .login-form,
    .checkout-form {
        max-width: 100vw;
        width: 100%;
        padding: 1.5rem;
        border-radius: 0;
        box-shadow: none;
    }

    .logo {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .login-side {
        padding: 0.5rem;
    }

    .login-form,
    .checkout-form {
        padding: 1rem;
        max-width: 100vw;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .logo {
        max-width: 90px;
    }

    h2 {
        font-size: 1.1rem;
    }
}

/* Add styles for required indicator */
.required {
    color: red;
    margin-left: 2px; /* Optional: Adds a small space before the asterisk */
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.checkout-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
}

h2 {
    color: #d85a7f;
    margin-bottom: 10px;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    position: relative;
}

.step-indicator > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    flex: 1;
}

.step-indicator:before {
    content: "";
    position: absolute;
    top: 25px;
    left: calc(16.67% + 8px);
    right: calc(16.67% + 8px);
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step-bubble {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.step-bubble.active {
    border-color: var(--Pink);
    background: var(--Pink);
    color: white;
}

.step-bubble.completed {
    border-color: var(--Pink);
    background: var(--Pink);
    color: white;
}

.step-title {
    font-size: 1rem;
    text-align: center;
    margin-top: 8px;
    font-weight: 500;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    @media (min-width: 1024px) {
        margin-top: 40px;
    }
}

.account-type-option {
    display: flex;
    align-items: center;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.account-type-option:hover {
    border-color: var(--Pink);
}

.account-type-option.selected {
    border-color: var(--Pink);
    background-color: rgba(79, 70, 229, 0.05);
}

.account-type-option.error {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

.account-type-option svg {
    width: 40px;
    height: 40px;
    margin-right: 20px;
    color: var(--Pink);
}

.account-type-content {
    flex: 1;
}

.account-type-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.account-type-description {
    font-size: 0.95rem;
    color: #666;
}

.btn-prev,
.btn-next,
.btn-submit {
    background-color: var(--Blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-prev {
    background-color: #f3f4f6;
    color: #374151;
}

.btn-prev:hover {
    background-color: #e5e7eb;
}
.btn-next {
    background-color: var(--Pink);
}
.btn-next:hover,
.btn-submit:hover {
    background-color: var(--Pink);
}

.btn-prev:disabled,
.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error styles */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group.has-error input,
.form-group.has-error select,
.choices__inner.has-error {
    border-color: var(--ErrorText) !important;
    background-color: rgba(216, 90, 90, 0.05);
}

.error-message {
    display: none;
    color: var(--ErrorText);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-group.has-error .error-message {
    display: block;
}

input.error,
select.error {
    border-color: var(--ErrorText) !important;
    background-color: rgba(216, 90, 90, 0.05);
}

.validation-summary {
    display: none;
    background-color: rgba(216, 90, 90, 0.1);
    border-left: 4px solid var(--ErrorText);
    padding: 10px 15px;
    margin-bottom: 20px;
    color: var(--ErrorText);
    border-radius: 4px;
}

.validation-summary.show {
    display: block;
}

.success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 360px;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.success-overlay .loading-spinner {
    width: 48px;
    height: 48px;
    color: var(--Pink);
    display: none;
}

.success-overlay .loading-spinner svg {
    width: 100%;
    height: 100%;
}

.success-overlay .success-checkmark {
    width: 56px;
    height: 56px;
    color: var(--Pink);
    display: none;
}

.success-overlay .success-checkmark svg {
    width: 100%;
    height: 100%;
}

.success-overlay .success-checkmark path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.success-overlay .success-checkmark.animate path {
    animation: drawCheckmark 2.2s ease-in-out forwards;
}

@keyframes drawCheckmark {
    to {
        stroke-dashoffset: 0;
    }
}

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