﻿/* Custom styles for TownVue registration pages */

/* Mobile-first responsive improvements */
@media (max-width: 767.98px) {
    .min-vh-100 .row > .col-lg-6 {
        min-height: auto;
        padding: 2rem 1rem;
    }

    .form-control-lg {
        font-size: 1rem;
        padding: 0.75rem;
    }
}

/* Enhanced form styling */
.form-control-lg:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Verification code input styling */
.form-control.text-center {
    font-weight: 600;
}

.form-control[inputmode="numeric"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.form-control[inputmode="numeric"]::-webkit-outer-spin-button,
.form-control[inputmode="numeric"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Button animations */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

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

/* Loading spinner for buttons */
.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Alert improvements */
.alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Card hover effects */
.card {
    transition: box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Form validation improvements */
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 1.62 1.62 3.44-3.44L8.37 4l-4.37 4.37L2.3 6.73z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Countdown timer styling */
#timerText {
    opacity: 0.7;
    font-size: 0.875rem;
}

#countdown {
    font-weight: 600;
    color: #0d6efd;
}

/* Background pattern for branding section */
.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    position: relative;
}

.bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    background-size: 100px 100px;
    background-position: 0 0, 50px 50px;
}

.bg-primary > * {
    position: relative;
    z-index: 1;
}

/* Business account section styling */
.card.border-0.bg-light {
    background-color: #f8f9fa !important;
    border-radius: 0.5rem;
}

/* Icon improvements */
.fas {
    font-weight: 900;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .card {
        transition: none;
    }

    .btn:hover {
        transform: none;
    }

    .fa-spinner {
        animation: none;
    }
}

/* Focus improvements for accessibility */
.form-control:focus,
.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
    }
}

/* Print styles */
@media print {
    .btn,
    .alert,
    .card {
        display: none !important;
    }
}

/* Smooth scrolling for form validation jumps */
html {
    scroll-behavior: smooth;
}

/* Enhanced error message styling */
.text-danger {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Form group spacing improvements */
.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}
