/**
 * =============================================================================
 * STOCKBOXX REGISTER PAGE - STYLE CSS
 * =============================================================================
 * Style specyficzne dla strony /customer/account/create w motywie StockBoxx
 * Konwersja z projektu Loveable (React + Tailwind) na natywny CSS
 * =============================================================================
 */

/* Layout fix handled globally in stockboxx.css via .stockboxx-page class */

/* =============================================================================
   SECTION 1: HERO + REGISTER FORM
   ============================================================================= */
.sb-register-hero {
    position: relative;
    background-color: var(--sb-green-main);
    padding: 80px 0;
    overflow: hidden;
}

@media (max-width: 767px) {
    .sb-register-hero {
        padding: 48px 0 64px;
    }
}

/* Decorative circle */
.sb-register-hero__circle {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
    z-index: 0;
}

/* Content layout */
.sb-register-hero__content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

@media (min-width: 1024px) {
    .sb-register-hero__content {
        flex-direction: row;
        align-items: flex-start;
        gap: 32px;
    }
}

/* Left column */
.sb-register-hero__left {
    flex: 1;
    padding-top: 16px;
}

@media (min-width: 1024px) {
    .sb-register-hero__left {
        max-width: 45%;
    }
}

/* Breadcrumbs */
.sb-register-hero__breadcrumbs {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
}

.sb-register-hero__breadcrumbs a {
    color: rgba(255, 255, 255, 0.5) !important;
    text-decoration: none !important;
    transition: color var(--sb-transition);
}

.sb-register-hero__breadcrumbs a:hover {
    color: #FFFFFF !important;
}

.sb-register-hero__breadcrumb-sep {
    margin: 0 8px;
}

/* Subtitle with checkmark */
.sb-register-hero__subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--sb-orange);
    margin: 0 0 20px 0;
}

/* Check icon in subtitle */
.sb-register-hero__check-icon {
    width: 14px;
    height: 14px;
    stroke: var(--sb-orange);
    flex-shrink: 0;
}

/* Title */
.stockboxx-page .sb-register-hero__title {
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -1px;
    color: #FFFFFF !important;
    text-transform: uppercase;
    margin: 0 0 24px 0;
}

.sb-register-hero__title .sb-text-orange {
    color: var(--sb-orange) !important;
}

/* Description */
.sb-register-hero__desc {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    max-width: 420px;
    margin: 0 0 36px 0;
}

/* Benefits list */
.sb-register-hero__benefits {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 24px 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sb-register-hero__benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 !important;
    margin: 0 !important;
}

/* Benefits list - checkmark icon */
.sb-register-hero__benefits li svg {
    width: 18px;
    height: 18px;
    stroke: var(--sb-orange);
    flex-shrink: 0;
}

.sb-register-hero__benefits span,
.sb-register-hero__benefits li {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
    color: #FFFFFF;
}

/* Login link */
.sb-register-hero__login-link {
    display: inline-block;
    font-size: 14px;
    line-height: 1.43; /* text-sm */
    font-weight: 600;
    color: var(--sb-orange) !important;
    text-decoration: none !important;
    margin-top: 24px;
    transition: text-decoration var(--sb-transition);
}

.sb-register-hero__login-link:hover {
    text-decoration: underline !important;
}

/* Right column */
.sb-register-hero__right {
    display: flex;
    justify-content: center;
}

@media (min-width: 1024px) {
    .sb-register-hero__right {
        flex: 1;
        justify-content: flex-end;
        max-width: 55%;
    }
}

/* =============================================================================
   REGISTER CARD
   ============================================================================= */
.sb-register-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    animation: sb-fade-in 0.4s ease;
}

@media (min-width: 640px) {
    .sb-register-card {
        padding: 40px;
    }
}

.sb-register-card__title {
    font-size: 24px;
    line-height: 1.33; /* text-2xl */
    font-weight: 700;
    color: var(--sb-green-main) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin: 0 0 8px 0 !important;
}

.sb-register-card__subtitle {
    font-size: 13px;
    line-height: 1.4;
    color: #888888;
    margin: 0 0 32px 0;
}

/* =============================================================================
   REGISTER FORM
   ============================================================================= */

/* Section styling */
.sb-register-form__section {
    margin-bottom: 28px;
}

.sb-register-form__section-title {
    font-size: 14px;
    line-height: 1.43; /* text-sm */
    font-weight: 700;
    color: var(--sb-green-main);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sb-gray-light);
    margin-bottom: 20px;
}

/* Row (for 2 columns) */
.sb-register-form__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .sb-register-form__row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Field */
.sb-register-form__field {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.sb-register-form__field:last-child {
    margin-bottom: 0;
}

/* Label */
.sb-register-form__label {
    display: block;
    font-size: 14px;
    line-height: 1.43; /* text-sm */
    font-weight: 500;
    color: #333333;
    margin-bottom: 6px;
}

.sb-register-form__required {
    color: #e02b27;
    margin-left: 2px;
}

/* Input styles */
.sb-register-form__input {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    font-family: var(--sb-font-family);
    font-size: 14px;
    color: var(--sb-card-foreground);
    background-color: #FCFAF8;
    border: 1px solid var(--sb-gray-light);
    border-radius: 10px;
    transition: border-color var(--sb-transition), box-shadow var(--sb-transition);
}

.sb-register-form__input::placeholder {
    color: #BBBBBB;
}

.sb-register-form__input:focus {
    outline: none;
    border-color: var(--sb-orange);
    box-shadow: 0 0 0 3px rgba(240, 102, 10, 0.12);
}

/* Password wrapper with toggle */
.sb-register-form__password-wrapper {
    position: relative;
}

.sb-register-form__input--password {
    padding-right: 44px;
}

.sb-register-form__toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: none !important;
    border: none !important;
    cursor: pointer;
    color: #AAAAAA;
    transition: color var(--sb-transition);
}

.sb-register-form__toggle-password:hover {
    color: var(--sb-green-main);
    background: none !important;
}

.sb-register-form__eye-icon {
    display: block;
}

/* Password strength meter - use ID because Magento JS removes all classes */
#password-strength-meter-container {
    margin-top: 8px;
}

#password-strength-meter-container .sb-register-form__strength-bars {
    display: flex;
    gap: 4px;
}

#password-strength-meter-container .sb-register-form__strength-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background-color: #E6E7EB;
    transition: background-color 0.2s ease;
}

#password-strength-meter-container .sb-register-form__strength-text {
    font-size: 11px;
    line-height: 1.35;
    color: #AAAAAA;
    margin: 4px 0 0 0;
}

/* Password strength states - Magento adds these classes to #password-strength-meter-container */
/* Weak - 1 bar red */
#password-strength-meter-container.password-weak .sb-register-form__strength-bar:nth-child(1) {
    background-color: #EF4444;
}

/* Medium - 2 bars orange */
#password-strength-meter-container.password-medium .sb-register-form__strength-bar:nth-child(1),
#password-strength-meter-container.password-medium .sb-register-form__strength-bar:nth-child(2) {
    background-color: #F59E0B;
}

/* Strong - 3 bars blue */
#password-strength-meter-container.password-strong .sb-register-form__strength-bar:nth-child(1),
#password-strength-meter-container.password-strong .sb-register-form__strength-bar:nth-child(2),
#password-strength-meter-container.password-strong .sb-register-form__strength-bar:nth-child(3) {
    background-color: #3B82F6;
}

/* Very Strong - 4 bars green */
#password-strength-meter-container.password-very-strong .sb-register-form__strength-bar {
    background-color: #22C55E;
}

/* Hide default Magento meter styling */
.password-strength-meter {
    display: none !important;
}

/* Consents section */
.sb-register-form__consents {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.sb-register-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Checkbox styling */
.sb-register-form__checkbox {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border: 2px solid var(--sb-gray-light);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--sb-orange);
    top: 0 !important;
    position: relative;
}

.sb-register-form__consent-label {
    font-size: 13px;
    color: #555555;
    line-height: 1.5;
    cursor: pointer;
}

.sb-register-form__consent-link {
    color: var(--sb-orange) !important;
    text-decoration: underline !important;
}

.sb-register-form__consent-link:hover {
    color: var(--sb-orange-hover) !important;
}

/* Submit button */
.sb-register-form__submit {
    border-radius: 10px !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 24px;
}

/* Note */
.sb-register-form__note {
    font-size: 12px;
    line-height: 1.33; /* text-xs */
    color: #AAAAAA;
    text-align: center;
    margin: 12px 0 0 0;
}

/* Validation error styles */
.sb-register-form__input.mage-error,
.sb-register-form select.mage-error,
#country.mage-error {
    border-color: #e02b27 !important;
}

.sb-register-form .mage-error[generated],
.sb-register-form__field .mage-error[generated] {
    font-size: 12px;
    color: #e02b27;
    margin-top: 4px;
}

/* =============================================================================
   REUSE STYLES FROM LOGIN PAGE
   ============================================================================= */
/* Benefits, Process, CTA sections use the same styles as login page */
/* Those styles are already loaded via stockboxx-login.css in the base theme */

/* If needed, import login styles or add body class to use them */
.stockboxx-register-page .sb-login-benefits,
.stockboxx-register-page .sb-login-process,
.stockboxx-register-page .sb-login-cta {
    /* Styles are inherited from stockboxx-login.css */
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */
.sb-text-orange {
    color: var(--sb-orange) !important;
}

/* =============================================================================
   ANIMATION
   ============================================================================= */
@keyframes sb-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
