/**
 * B2B Login Page Styles
 */

/* CSS Variables */
:root {
    --b2b-banner-color: #1a1a2e;
    --b2b-banner-opacity: 0.85;
    --b2b-primary: #4a90d9;
    --b2b-primary-dark: #3a7bc8;
    --b2b-secondary: #1a1a2e;
    --b2b-secondary-light: #2d2d44;
    --b2b-text: #333;
    --b2b-text-light: #6c757d;
    --b2b-border: #ddd;
    --b2b-bg: #f8f9fa;
}

/* Standalone page reset */
.b2b-standalone-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--b2b-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.b2b-standalone-page *,
.b2b-standalone-page *::before,
.b2b-standalone-page *::after {
    box-sizing: border-box;
}

/* Reset and base styles for the login page */
.b2b-login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--b2b-bg);
}

/* Header */
.b2b-header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.b2b-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.b2b-logo img {
    max-height: 50px;
    width: auto;
}

/* Main content */
.b2b-main {
    flex: 1;
    padding: 0;
}

/* Container */
.b2b-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Grid */
.b2b-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.b2b-col {
    padding: 0 15px;
    width: 100%;
}

/* Top section - Login and Register */
.b2b-top-section {
    margin-bottom: 0;
    padding-top: 50px;
    padding-bottom: 60px;
    background-image: url('/herbslider.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.b2b-top-section .b2b-row {
    align-items: stretch;
}

.b2b-login-col {
    flex: 0 0 50%;
    max-width: 50%;
}

.b2b-register-col {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Login box — aligned to the left of its column */
.b2b-login-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    max-width: 460px;
    margin: 0;
}

/* Register CTA — readable card, aligned to the right so it clears the banner */
.b2b-register-cta {
    padding: 36px 40px;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Typography */
.b2b-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--b2b-secondary);
    margin: 0 0 15px 0;
}

.b2b-subtitle {
    font-size: 16px;
    color: var(--b2b-text-light);
    margin: 0 0 25px 0;
    line-height: 1.6;
}

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

.b2b-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--b2b-text);
    margin-bottom: 8px;
}

.b2b-form-group label small {
    font-weight: 400;
    color: var(--b2b-text-light);
}

.b2b-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid var(--b2b-border);
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.b2b-input:focus {
    outline: none;
    border-color: var(--b2b-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.b2b-input::placeholder {
    color: #aaa;
}

/* Password toggle */
.b2b-password-wrapper {
    position: relative;
}

.b2b-password-wrapper .b2b-input {
    padding-right: 45px;
}

.b2b-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: var(--b2b-text-light);
    transition: color 0.2s;
}

.b2b-toggle-password:hover {
    color: var(--b2b-text);
}

.b2b-toggle-password .eye-icon {
    fill: currentColor;
}

/* Buttons */
.b2b-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.b2b-btn-primary {
    background-color: var(--b2b-primary);
    color: #fff;
}

.b2b-btn-primary:hover {
    background-color: var(--b2b-primary-dark);
}

.b2b-btn-secondary {
    background-color: var(--b2b-secondary);
    color: #fff;
}

.b2b-btn-secondary:hover {
    background-color: var(--b2b-secondary-light);
}

.b2b-btn-small {
    padding: 10px 16px;
    font-size: 13px;
}

.b2b-btn-full {
    width: 100%;
}

.b2b-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Form actions */
.b2b-form-actions {
    margin-top: 25px;
}

.b2b-form-links {
    text-align: center;
    margin-top: 20px;
}

.b2b-link {
    color: var(--b2b-primary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.b2b-link:hover {
    color: var(--b2b-primary-dark);
    text-decoration: underline;
}

/* Description section */
.b2b-description-section {
    background-color: #fff;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

/* Banner background */
.b2b-description-section.b2b-has-banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.b2b-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--b2b-banner-color);
    opacity: var(--b2b-banner-opacity);
    z-index: 0;
}

.b2b-has-banner .b2b-description-content,
.b2b-has-banner .b2b-description-content h2,
.b2b-has-banner .b2b-description-content p,
.b2b-has-banner .b2b-description-content em,
.b2b-has-banner .b2b-description-content ul li {
    color: #fff;
}

.b2b-description-section .b2b-row {
    align-items: center;
}

.b2b-description-col {
    flex: 0 0 50%;
    max-width: 50%;
}

.b2b-description-col.b2b-full-width {
    flex: 0 0 100%;
    max-width: 100%;
}

.b2b-description-col.b2b-full-width .b2b-description-content {
    padding-right: 0;
    max-width: 800px;
}

.b2b-image-col {
    flex: 0 0 50%;
    max-width: 50%;
}

.b2b-description-content {
    padding-right: 40px;
}

.b2b-description-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--b2b-secondary);
    margin: 0 0 20px 0;
}

.b2b-description-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 15px 0;
}

.b2b-description-content em {
    color: var(--b2b-text-light);
}

.b2b-description-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.b2b-description-content ul li {
    font-size: 15px;
    color: var(--b2b-text);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.b2b-description-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Footer */
.b2b-footer {
    background-color: #fff;
    border-top: 1px solid #eee;
    padding: 25px 0;
}

.b2b-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.b2b-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.b2b-footer-links a {
    color: var(--b2b-text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.b2b-footer-links a:hover {
    color: var(--b2b-primary);
}

.b2b-copyright {
    color: var(--b2b-text-light);
    font-size: 13px;
    margin: 0;
}

/* Modal */
.b2b-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.b2b-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.b2b-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.b2b-modal-container {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.b2b-modal-container.b2b-modal-small {
    max-width: 450px;
}

.b2b-modal[aria-hidden="false"] .b2b-modal-container {
    transform: translateY(0);
}

.b2b-form-description {
    color: var(--b2b-text-light);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.b2b-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.b2b-modal-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--b2b-secondary);
    margin: 0;
}

.b2b-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.b2b-modal-close:hover {
    color: var(--b2b-text);
}

.b2b-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* Fieldset */
.b2b-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.b2b-fieldset legend {
    font-size: 16px;
    font-weight: 600;
    color: var(--b2b-secondary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--b2b-primary);
    display: block;
    width: 100%;
}

/* Form row */
.b2b-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.b2b-form-row .b2b-form-group {
    margin-bottom: 20px;
}

.b2b-half {
    flex: 1;
}

.b2b-third {
    flex: 0 0 30%;
}

.b2b-two-thirds {
    flex: 0 0 calc(70% - 15px);
}

/* NIP field with GUS button */
.b2b-nip-wrapper {
    display: flex;
    gap: 10px;
}

.b2b-nip-wrapper .b2b-input {
    flex: 1;
}

.b2b-form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--b2b-text-light);
}

/* Checkbox */
.b2b-checkbox-group {
    margin-bottom: 15px;
}

.b2b-checkbox {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.b2b-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.b2b-checkbox .checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--b2b-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 2px;
}

.b2b-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: var(--b2b-primary);
    border-color: var(--b2b-primary);
}

.b2b-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.b2b-checkbox .label-text {
    color: #555;
    display: inline;
}

.b2b-checkbox .label-text p {
    display: inline;
    margin: 0;
    padding: 0;
}

.b2b-checkbox .label-text a {
    color: var(--b2b-primary);
}

.b2b-checkbox .label-text .required-star,
.b2b-consents .required-star {
    color: #e74c3c;
    display: inline;
    margin-left: 2px;
}

/* Radio buttons */
.b2b-radio-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 30px;
}

.b2b-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    min-width: 80px;
}

.b2b-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.b2b-radio .radio-mark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--b2b-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.b2b-radio input[type="radio"]:checked + .radio-mark {
    border-color: var(--b2b-primary);
}

.b2b-radio input[type="radio"]:checked + .radio-mark::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: var(--b2b-primary);
    border-radius: 50%;
}

.b2b-radio .label-text {
    color: #555;
}

/* Question sections */
.b2b-questions-section {
    margin-top: 15px;
}

.b2b-question {
    transition: opacity 0.2s ease, max-height 0.3s ease;
}

/* Alerts */
.b2b-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.b2b-alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.b2b-alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.b2b-alert ul {
    margin: 0;
    padding-left: 20px;
}

.b2b-alert li {
    margin-bottom: 5px;
}

.b2b-alert li:last-child {
    margin-bottom: 0;
}

/* Spinner animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 991px) {
    .b2b-login-col,
    .b2b-register-col,
    .b2b-description-col,
    .b2b-image-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .b2b-description-col.b2b-full-width {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* The stacked (login + CTA) section gets tall on mobile; with
       background-size:cover the photo zoomed enormously. Scale it to the
       full width instead and fill the rest with a neutral tone. */
    .b2b-top-section {
        background-size: 100% auto;
        background-position: top center;
        background-color: #eef1f4;
    }

    .b2b-login-box {
        max-width: 100%;
        margin-bottom: 30px;
    }

    .b2b-register-cta {
        padding: 30px 24px;
        max-width: 100%;
        text-align: center;
    }

    .b2b-description-content {
        padding-right: 0;
        margin-bottom: 30px;
    }

    .b2b-description-section {
        padding: 40px 0;
    }
}

@media (max-width: 576px) {
    .b2b-main {
        padding: 20px 0 0 0;
    }

    .b2b-login-box {
        padding: 25px;
    }

    .b2b-title {
        font-size: 24px;
    }

    .b2b-form-row {
        flex-direction: column;
        gap: 0;
    }

    .b2b-third,
    .b2b-two-thirds {
        flex: 0 0 100%;
    }

    .b2b-modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .b2b-modal-body {
        padding: 20px;
    }

    .b2b-nip-wrapper {
        flex-direction: column;
    }

    .b2b-footer-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* ===== Toast Notification ===== */
#b2b-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    min-width: 320px;
    max-width: 480px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
#b2b-toast.b2b-toast--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
#b2b-toast.b2b-toast--hiding {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
}
.b2b-toast__content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
}
.b2b-toast__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
}
.b2b-toast__text {
    flex: 1;
    font-size: 14px;
    line-height: 1.45;
    color: #333;
}
.b2b-toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}
.b2b-toast__close:hover {
    color: #333;
}
.b2b-toast__progress {
    height: 3px;
    background: #e5e5e5;
}
.b2b-toast__bar {
    height: 100%;
    width: 100%;
    background: #22c55e;
    border-radius: 0 0 0 3px;
}
@media (max-width: 480px) {
    #b2b-toast {
        bottom: 12px;
        right: 12px;
        left: 12px;
        min-width: 0;
        max-width: none;
    }
}

/* ===== Consent Popup Overlay ===== */
.b2b-consent-popup {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.b2b-consent-popup--visible {
    opacity: 1;
    pointer-events: auto;
}
.b2b-consent-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.b2b-consent-popup__container {
    position: relative;
    width: 90vw;
    max-width: 800px;
    height: 80vh;
    max-height: 700px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s ease;
}
.b2b-consent-popup--visible .b2b-consent-popup__container {
    transform: translateY(0) scale(1);
}
.b2b-consent-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.b2b-consent-popup__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.b2b-consent-popup__close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
.b2b-consent-popup__close:hover {
    color: #333;
}
.b2b-consent-popup__body {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.b2b-consent-popup__loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--b2b-primary, #4a90d9);
}
.b2b-consent-popup__loader .spinner {
    animation: spin 1s linear infinite;
}
.b2b-consent-popup__content {
    padding: 24px 28px;
    overflow-y: auto;
    height: 100%;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.b2b-consent-popup__content h1,
.b2b-consent-popup__content h2,
.b2b-consent-popup__content h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #1a1a2e;
}
.b2b-consent-popup__content h1 { font-size: 20px; }
.b2b-consent-popup__content h2 { font-size: 17px; }
.b2b-consent-popup__content h3 { font-size: 15px; }
.b2b-consent-popup__content p { margin-bottom: 0.8em; }
.b2b-consent-popup__content ul,
.b2b-consent-popup__content ol {
    padding-left: 24px;
    margin-bottom: 1em;
}
.b2b-consent-popup__content a {
    color: var(--b2b-primary, #4a90d9);
    text-decoration: underline;
}
@media (max-width: 600px) {
    .b2b-consent-popup__container {
        width: 96vw;
        height: 90vh;
        max-height: none;
        border-radius: 8px;
    }
}
