/* ============================================================
   Property Registration Form - Real Estate Theme
   ============================================================ */

/* ---------- Fonts ---------- */
/* Inter for body text, Playfair Display for headings */

/* ---------- CSS Reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ---------- Hero Background ---------- */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)),
        url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Fallback gradient if image doesn't load */
.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(30, 41, 59, 0.92) 50%,
        rgba(51, 65, 85, 0.9) 100%);
    z-index: 1;
}

/* Animated overlay pattern */
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    z-index: 2;
}

/* ---------- Admin Access Button ---------- */
.admin-access-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-access-btn:hover {
    background: rgba(245, 158, 11, 0.9);
    border-color: rgba(245, 158, 11, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.admin-access-btn:active {
    transform: translateY(0);
}

/* ---------- Content Wrapper ---------- */
.content-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    z-index: 10;
}

/* ---------- Form Container (Glassmorphism) ---------- */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    width: 100%;
    max-width: 520px;
    padding: 3rem 2.5rem;
    animation: slideIn 0.6s ease-out;
}

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

/* ---------- Brand Section ---------- */
.brand-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 20px;
    color: #ffffff;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.form-container h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.form-container .subtitle {
    font-size: 1rem;
    color: #64748b;
    font-weight: 400;
    line-height: 1.5;
}

/* ---------- Form Elements ---------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.input-icon {
    color: #f59e0b;
    flex-shrink: 0;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-group input::placeholder {
    color: #6b7280;
}

.form-group input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
    background: #ffffff;
    transform: translateY(-1px);
}

.form-group input:hover:not(:focus) {
    border-color: #cbd5e1;
}

.form-group input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-group input.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.field-error {
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.375rem;
    min-height: 1.2em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ---------- Submit Button ---------- */
.btn-submit {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

.btn-submit:hover:not(:disabled)::before {
    left: 100%;
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner inside button */
.btn-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.btn-submit.loading .spinner {
    display: inline-block;
}

.btn-submit.loading .btn-text {
    opacity: 0.8;
}

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

/* ---------- Messages ---------- */
.form-message {
    display: none;
    text-align: center;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: messageSlideIn 0.3s ease-out;
}

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

.form-message.visible {
    display: block;
}

.form-message.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border: 2px solid #a7f3d0;
}

.form-message.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border: 2px solid #fecaca;
}

/* ---------- "Register Another" Button ---------- */
.btn-another {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    color: #f59e0b;
    background: transparent;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-another:hover {
    background: #f59e0b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-another:active {
    transform: translateY(0);
}

/* ---------- Form Footer ---------- */
.form-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.form-footer p {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.6;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 768px) {
    .admin-access-btn {
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 640px) {
    .admin-access-btn {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .admin-access-btn svg {
        width: 18px;
        height: 18px;
    }

    .content-wrapper {
        padding: 1.5rem 1rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .brand-icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .form-container h1 {
        font-size: 1.625rem;
    }

    .form-container .subtitle {
        font-size: 0.9375rem;
    }

    .form-group input {
        font-size: 1rem;
        padding: 0.8rem 0.875rem;
    }

    .btn-submit {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.75rem 1.25rem;
    }

    .form-container h1 {
        font-size: 1.5rem;
    }

    .brand-section {
        margin-bottom: 2rem;
    }

    .form-group input,
    .btn-submit {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
input:focus-visible,
button:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .hero-background {
        display: none;
    }

    .form-container {
        box-shadow: none;
        background: white;
    }
}