/* CSS Document */

:root {
    --primary-color: #2ac8c8;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --background: #ffffff;
    --surface: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Container to center the form on the page - matching login */
.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Unique heartbeat bar class */
.buggy-heartbeat-bar {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: var(--text-light);
    opacity: 0.3;
    animation: pulse 2s infinite;
    z-index: 1;
}

/* Mobile responsive heartbeat bar */
@media (max-width: 768px) {
    .register-container {
        padding-bottom: 20px;
    }
    
    .buggy-heartbeat-bar {
        display: none; /* Hide on mobile for now */
    }
}

/* Floating Labels - adapted from quote page */
.buggy-quote-floating-field {
    position: relative;
    margin-bottom: 12px; /* Reduced from 16px to 12px */
}

.buggy-quote-input {
    width: 100%;
    padding: 20px 0 8px 12px; /* Added left padding to match label */
    border: none;
    border-bottom: 2px solid #e5e7eb;
    background: transparent;
    font-size: 14px; /* Reduced from 16px for uniformity with labels */
    transition: all 0.3s ease;
    outline: none;
}

.buggy-quote-input:focus {
    border-bottom-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(42, 200, 200, 0.25);
}

.buggy-quote-label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px 8px 8px 10px; /* Adjusted padding: less left, added right padding */
    pointer-events: none;
    font-size: 13px; /* Reduced further for better fit on mobile side-by-side fields */
    color: var(--text-light);
    transition: all 0.3s ease;
    transform-origin: top left;
    font-weight: 400;
    white-space: nowrap; /* Prevent label text from wrapping */
}

/* Float label when input has focus or value - JavaScript controlled */
.buggy-quote-floating-field .buggy-quote-input:focus ~ .buggy-quote-label,
.buggy-quote-floating-field.has-value .buggy-quote-label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-1rem) translateX(0.15rem);
    color: var(--primary-color);
}

/* Fallback for browsers that support :placeholder-shown */
.buggy-quote-floating-field .buggy-quote-input:not(:placeholder-shown) ~ .buggy-quote-label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-1rem) translateX(0.15rem);
    color: var(--primary-color);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}

/* Progressive password validation animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideOutAndFade {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 16px;
        padding: 2px 0;
    }
    50% {
        opacity: 0.5;
        transform: translateX(20px) scale(0.95);
    }
    100% {
        opacity: 0;
        transform: translateX(40px) scale(0.8);
        max-height: 0;
        padding: 0;
    }
}

@keyframes slideInAndFade {
    0% {
        opacity: 0;
        transform: translateX(-20px) scale(0.9);
        max-height: 0;
        padding: 0;
    }
    50% {
        opacity: 0.5;
        transform: translateX(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 16px;
        padding: 2px 0;
    }
}

/* Compass specific styles for registration */
.buggy-logo-section {
    margin-bottom: 40px;
}

/* Compass container with glassmorphism background */
.buggy-logo-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.5));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* SVG Compass - 120x120 size */
.buggy-compass-svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

/* Compass needle animation - gentle rotation */
.compass-needle {
    transform-origin: 60px 60px;
    animation: rotate-compass 8s ease-in-out infinite;
}

@keyframes rotate-compass {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(15deg);
    }
    50% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(-15deg);
    }
}

/* Styling for the register form border - matching login form */
#register_border {
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 32px; /* Reduced from 40px to 32px for tighter spacing */
    background: white;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

#register_border:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
}

/* Styling for input fields within the form - matching login form */
#register_border input[type=text],
#register_border input[type=password],
#register_border input[type=email],
#register_border input[type=tel] {
    width: 100%;
    margin-bottom: 10px;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

#register_border input[type=text]:focus,
#register_border input[type=password]:focus,
#register_border input[type=email]:focus,
#register_border input[type=tel]:focus {
    border-color: #2ac8c8;
    box-shadow: 0 0 0 4px rgba(42, 200, 200, 0.1);
    background-color: white;
    outline: none;
}

/* Form labels styling */
/* Password requirements styling updates */
.password-requirements .requirement {
    padding: 2px 0;
    font-size: 11px;
    color: #666;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px; /* Increased gap for more consistent spacing */
    white-space: nowrap;
    line-height: 1.2;
    /* Force consistent text rendering */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-kerning: none; /* Disable font kerning for consistent spacing */
    text-rendering: optimizeLegibility;
}

.password-requirements .requirement.met {
    color: #22c55e;
    font-weight: 500;
}

.password-strength-container {
    margin-top: 6px;
    padding: 8px 10px;
    background: rgba(42, 200, 200, 0.05);
    border-radius: 6px;
    border-left: 2px solid var(--primary-color);
    animation-fill-mode: forwards;
    font-size: 11px;
}

.password-requirements .requirement::before {
    content: "○";
    color: #ccc;
    font-weight: bold;
    font-size: 10px;
    flex-shrink: 0;
    /* Force consistent bullet point spacing */
    width: 12px; /* Fixed width for bullet */
    text-align: center;
    display: inline-block;
    margin-right: 0; /* Remove any margin */
}

.password-requirements .requirement.met::before {
    content: "✓";
    color: #22c55e;
    font-weight: bold;
    font-size: 10px;
    flex-shrink: 0;
    /* Force consistent bullet point spacing */
    width: 12px; /* Fixed width for bullet */
    text-align: center;
    display: inline-block;
    margin-right: 0; /* Remove any margin */
}

#register_border .form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

/* Required indicator styling */
.required-indicator {
    color: #dc3545;
    font-size: 0.9em;
    margin-left: 2px;
    opacity: 0.8;
}

/* Validation styling - error state */
#register_border input.is-invalid,
#register_border input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
    border-bottom: 2px solid #dc3545;
}

#register_border input.is-invalid:focus,
#register_border input:invalid:not(:placeholder-shown):focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Validation styling - success state */
#register_border input.is-valid,
#register_border input:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

#register_border input.is-valid:focus,
#register_border input:valid:not(:placeholder-shown):focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Error message styling */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Shake animation for validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#register_border input.is-invalid {
    animation: shake 0.5s;
}

/* Styling for the submit button within the form - matching login form */
#register_border button {
    width: 100%;
    padding: 16px 32px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
}

/* Styling for terms and conditions */
#register_border .form-check-label {
    display: block;
    margin-top: 10px;
}

#register_border .form-check-input {
    margin-right: .5rem;
}

#formchecklabel {
    font-size: 10px;
    text-align: center;
}

#registerformchecklabel {
    font-size: 14px;
    text-align: center;
}

#registerborderlink {
    text-decoration: none;
    color: #2ac8c8;
}

#register1_submit {
    background-color: #2ac8c8;
    color: #ffffff;
    border: none;
}

#register1_submit:hover {
    background-color: #25b3b3;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(42, 200, 200, 0.3);
}

#signuplink {
    text-decoration: none;
    color: #2ac8c8;
}

/* Heart Branding */
.buggy-heart-branding {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.heart-container {
    margin-bottom: 8px;
}

.heart-icon {
    font-size: 24px;
    color: var(--primary-color);
    animation: heartBeat 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(42, 200, 200, 0.2));
}

.heart-text {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@keyframes heartBeat {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1;
    }
}

/* Register header styles moved to auth-header.css */
