/**
 * Registration Page Styles
 * Immersive, premium design inspired by luxury wine experiences
 */

.register-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    background-color: #0a0a0a;
    overflow: hidden;
}

.register-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/img/vineyard-bg-dark.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 1;
}

.register-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%);
}

.register-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.register-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.register-title {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 300;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.register-subtitle {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0 auto 1rem;
    max-width: 600px;
}

.register-exclusive {
    font-size: 0.95rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0 auto 2rem;
    max-width: 600px;
    font-style: italic;
}

.register-form {
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.form-col {
    flex: 1 0 50%;
    padding: 0 0.75rem;
}

@media (max-width: 768px) {
    .form-col {
        flex: 1 0 100%;
    }
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: color 0.3s ease;
}

/* Password Toggle Button - Elegant Style */
.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(173, 132, 80, 0.5);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(173, 132, 80, 0.2);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.password-toggle:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(173, 132, 80, 0.5);
    box-shadow: 0 0 0 3px rgba(173, 132, 80, 0.2);
}

.eye-icon {
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 18px;
    height: 18px;
}

.password-toggle:hover .eye-icon {
    color: rgba(173, 132, 80, 1);
    transform: scale(1.1);
}

/* Adjust input padding when password toggle is present */
.input-with-icon:has(.password-toggle) .form-control {
    padding-right: 3.5rem;
    padding-left: 1rem;
}

/* Animation for password toggle state change */
.password-toggle.animating .eye-icon {
    animation: eyeBlink 0.3s ease-in-out;
}

@keyframes eyeBlink {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: rgba(173, 132, 80, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(173, 132, 80, 0.2);
}

.form-control:focus + .input-icon {
    color: var(--color-gold);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-check {
    display: flex;
    align-items: flex-start;
    margin-top: 1rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.form-check-input:checked {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
}

.form-check-input:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-check-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    line-height: 1.5;
}

.form-check-label a {
    color: var(--color-gold);
    text-decoration: none;
    transition: all 0.3s ease;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Register page override: ensure checkbox checkmark visible.
   login-styles.css forces a tiny round checkbox via !important; here we opt back into native checkbox
   with accent-color for maximum clarity and consistency across browsers. */
.login-section .form-check-input {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    accent-color: var(--color-gold);
}

.login-section .form-check-input:checked::after {
    content: none !important;
}

.login-section .form-check-label {
    color: rgba(29, 29, 31, 0.78);
}

.login-section .form-check-label a {
    color: var(--color-gold);
}

.register-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
    background-color: #f8f8f8;
}

.register-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.register-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.8), rgba(255,255,255,0) 70%);
    transform: translateX(-100%);
    transition: all 0.6s ease;
}

.register-btn:hover::after {
    transform: translateX(100%);
}

.register-btn-text {
    position: relative;
    z-index: 2;
}

.register-links {
    text-align: center;
    margin-top: 2rem;
}

.register-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: var(--color-gold);
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    animation: alertFadeIn 0.5s ease-out;
}

@keyframes alertFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert svg {
    margin-right: 0.8rem;
    min-width: 24px;
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #e17a86;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: #75c687;
}

.alert-info {
    background: rgba(30, 64, 175, 0.1);
    border: 1px solid rgba(30, 64, 175, 0.2);
    color: #6b8fc9;
}

/* Form hints */
.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Apple-like micro actions (generate/copy password) */
.pw-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.pw-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(245, 245, 247, 0.9);
    color: rgba(29, 29, 31, 0.92);
    font-size: 0.82rem;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
    box-shadow: none;
}

.pw-action-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.16);
}

.pw-action-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.08);
}

.pw-hint {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(29, 29, 31, 0.62);
    line-height: 1.35;
}

/* Wine Club dedicated step (Apple-like) */
.wc-step-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.wc-step-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(201, 169, 97, 0.18);
    color: #7a6b3d;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(201, 169, 97, 0.25);
}
.wc-step-card-title {
    font-weight: 600;
    color: rgba(29, 29, 31, 0.92);
    margin-bottom: 6px;
}
.wc-step-card-text {
    font-size: 0.95rem;
    color: rgba(29, 29, 31, 0.70);
    line-height: 1.5;
}
.wc-step-benefits {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}
.wc-step-benefit {
    font-size: 0.9rem;
    color: rgba(29, 29, 31, 0.72);
    padding-left: 14px;
    position: relative;
}
.wc-step-benefit:before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(201, 169, 97, 0.85);
    position: absolute;
    left: 0;
    top: 8px;
}
.wc-step-check {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    cursor: pointer;
    align-items: flex-start;
}
.wc-step-check input[type="checkbox"] {
    margin-top: 4px;
}
.wc-step-note {
    display: block;
    margin-top: 4px;
    font-weight: 400;
    color: rgba(29, 29, 31, 0.55);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 576px) {
    .register-container {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .register-title {
        font-size: 1.8rem;
    }
}

/* Animation for decorative elements */
.register-decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(173, 132, 80, 0.2);
    border-radius: 50%;
    z-index: 1;
    opacity: 0.5;
}

.register-decoration:nth-child(1) {
    top: -150px;
    left: -150px;
    animation: rotate 60s linear infinite;
}

.register-decoration:nth-child(2) {
    bottom: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    animation: rotate 80s linear infinite reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
