/* 
-- TaxiMom Premium Design System --
Guardian Registration Modern Upgrade
*/

:root {
    --tm-primary: #0435A9; /* Exact Blue from Header/Logo */
    --tm-primary-hover: #032d8c; 
    --tm-secondary-blue: #2577E6; /* Secondary Blue from Logo accents */
    --tm-dark: #121212;
    --tm-text-primary: #1A1A1A;
    --tm-text-secondary: #444444;
    --tm-bg: #F8F9FA;
    --tm-white: #FFFFFF;
    --tm-glass: rgba(255, 255, 255, 0.95);
    --tm-glass-border: rgba(255, 255, 255, 0.6);
    --tm-shadow: 0 20px 40px rgba(0, 53, 169, 0.12);
    --tm-radius: 24px;
    --tm-input-bg: #F0F4F8;
}

.tm-error-message {
    color: #fd3995 !important; /* High-contrast pink/red */
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    margin-top: 8px !important;
    display: block !important;
    line-height: 1.4 !important;
}

/* Global Container Improvements */
body.registration-page {
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    font-family: 'Inter', sans-serif !important;
    font-size: 1.15rem; /* Increased base font size */
    color: var(--tm-text-primary);
    min-height: 100vh;
}

.premium-container {
    max-width: 1050px;
    margin: 60px auto;
    padding: 20px;
}

.premium-card {
    background: var(--tm-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--tm-glass-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    padding: 4.5rem;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .premium-card {
        padding: 2rem 1.5rem !important; /* Reduced padding for mobile */
        border-radius: 16px;
    }
}

/* Stepper UI */
.tm-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5rem;
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tm-stepper::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 0;
    right: 0;
    height: 4px;
    background: #EBF0F5;
    z-index: 1;
}

.tm-step {
    position: relative;
    z-index: 2;
    background: var(--tm-white);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #EBF0F5;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--tm-text-secondary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}

.tm-step.active {
    border-color: var(--tm-primary);
    background: var(--tm-primary);
    color: var(--tm-white);
    box-shadow: 0 0 25px rgba(4, 53, 169, 0.3);
    transform: scale(1.15);
}

.tm-step.completed {
    background: var(--tm-secondary-blue);
    border-color: var(--tm-secondary-blue);
    color: var(--tm-white);
}

.tm-step-label {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tm-text-secondary);
}

.tm-step.active .tm-step-label {
    color: var(--tm-primary);
}

/* Form Styles */
.form-section {
    display: none;
    animation: slideIn 0.6s ease;
}

.form-section.active {
    display: block;
}

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

.premium-section-title {
    font-weight: 800 !important;
    font-size: 1.6rem !important; /* Unified large size */
    color: var(--tm-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem !important;
}

.premium-section-title i {
    color: var(--tm-primary);
    font-size: 1.4rem;
}

.premium-label {
    font-weight: 700;
    font-size: 1.1rem; /* Increased label font size */
    margin-bottom: 0.8rem;
    color: var(--tm-dark);
    display: flex;
    align-items: center;
}

.premium-input {
    background: var(--tm-input-bg);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 1.2rem 1.4rem; /* More generous padding */
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1.15rem; /* Increased input font size */
    color: var(--tm-dark);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.premium-input:focus {
    background: var(--tm-white);
    border-color: var(--tm-primary);
    box-shadow: 0 0 0 6px rgba(4, 53, 169, 0.08);
    outline: none;
    transform: translateY(-2px);
}

@media (max-width: 576px) {
    .premium-input {
        padding: 1rem !important;
        font-size: 1rem !important;
    }
    .premium-label {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    .tm-btn {
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
        width: 100%; /* Full width buttons on mobile */
    }
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    background-color: var(--tm-input-bg) !important;
    border: 2px solid transparent !important;
    border-radius: 16px !important;
    height: 58px !important; /* Match input height */
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 1.15rem !important;
    padding-left: 1.4rem !important;
    padding-right: 3rem !important; /* Space for arrow */
    color: var(--tm-dark) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 58px !important;
    width: 40px !important;
    right: 15px !important;
    top: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border: none !important;
    width: 12px !important;
    height: 12px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230435A9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    margin: 0 !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
}

/* Ensure standard selects also look the same if used */
select.premium-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230435A9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 25px center !important;
    background-size: 14px !important;
    padding-right: 3.5rem !important;
}

/* Buttons */
.tm-btn {
    padding: 1.2rem 3rem; /* Very generous buttons */
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    cursor: pointer;
}

.tm-btn-primary {
    background: var(--tm-primary);
    color: var(--tm-white);
    box-shadow: 0 10px 20px rgba(4, 53, 169, 0.2);
}

.tm-btn-primary:hover {
    background: var(--tm-primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(4, 53, 169, 0.35);
}

.tm-btn-outline {
    background: transparent;
    border: 2px solid var(--tm-primary);
    color: var(--tm-primary);
}

.tm-btn-outline:hover {
    background: var(--tm-primary);
    color: #fff;
    transform: translateY(-5px);
}

/* Centering the Signature Pad */
.signature-container {
    background: #fff;
    border: 3px dashed #D1D9E6;
    border-radius: 20px;
    padding: 25px;
    margin: 30px auto; 
    max-width: 600px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jay-signature-pad--body {
    width: 100%;
    display: flex;
    justify-content: center;
}

canvas#jay-signature-pad {
    width: 100%;
    max-width: 550px;
    height: 280px;
    touch-action: none;
    border: 1px solid #f0f0f0;
    background: #fff;
    border-radius: 10px;
}

/* Responsive Tweak */
@media (max-width: 768px) {
    .premium-card {
        padding: 1.5rem;
    }
    .tm-step-label {
        display: none;
    }
    .tm-stepper {
        margin-bottom: 2rem;
    }
}
