/**
 * Frontend Styles for Technician Management Plugin
 */

/* Blur email and mobile in search results */
.technician-card .technician-email-field .blurred-field,
.technician-card .technician-mobile-field .blurred-field {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
    transition: filter 0.3s ease;
    display: inline-block;
}

/* Form Container */
.tech-manager-form-container {
    min-height: 100vh;
    background-color: #f8f9fa;
    padding: 2rem 0;
}

/* Form Styling */
.tech-manager-search-form,
#client-registration-form,
#technician-registration-form,
#tech-manager-contact-form {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tech-manager-search-form h4,
#client-registration-form h4,
#technician-registration-form h4,
#tech-manager-contact-form h4 {
    color: #003580;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form Fields */
.search-field,
.form-field {
    margin-bottom: 1.5rem;
}

.search-field label,
.form-field label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.search-field input,
.search-field select,
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 1.5rem;
}

.search-field input:focus,
.search-field select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #003580;
    box-shadow: 0 0 0 0.2rem rgba(0, 53, 128, 0.25);
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* Form Grid Layout */
.tech-manager-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Buttons */
.search-actions,
.form-field input[type="submit"] {
    text-align: center;
    margin-top: 1.5rem;
}

.search-button,
.clear-button,
.form-field input[type="submit"] {
    background: #ff6b35;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.search-button:hover,
.clear-button:hover,
.form-field input[type="submit"]:hover {
    background: #ff8c42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.clear-button {
    background: #6b7280;
}

.clear-button:hover {
    background: #4b5563;
}

/* Notices */
.tech-manager-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #92400e;
    font-weight: 500;
    line-height: 1.5;
}

.tech-manager-notice i {
    margin-right: 6px;
}

.tech-manager-notice p {
    margin: 0;
    font-weight: 500;
}

.tech-manager-notice-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.tech-manager-notice-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Search Results */
.search-results {
    margin-top: 2rem;
}

.technician-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.technician-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.technician-card .card-title {
    color: #003580;
    font-weight: 600;
    margin-bottom: 1rem;
}

.technician-details p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.technician-details strong {
    color: #374151;
    font-weight: 600;
}

.card-actions {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: auto;
}

.contact-technician {
    background: #003580;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-technician:hover {
    background: #0071c2;
    transform: translateY(-1px);
}

/* Search Filters */
.search-filters {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.search-filters h3 {
    color: #374151;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.search-filters .list-inline {
    margin: 0;
    padding: 0;
}

.search-filters .list-inline-item {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.bg-primary {
    background-color: #003580 !important;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.no-results i {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: #374151;
    margin-bottom: 1rem;
}

.no-results p {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Modal Styling */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background: #003580;
    color: #fff;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 2rem;
}

/* Form Validation */
.form-field input:invalid,
.form-field select:invalid,
.form-field textarea:invalid {
    border-color: #ef4444;
}

.form-field input:valid,
.form-field select:valid,
.form-field textarea:valid {
    border-color: #10b981;
}

/* Enhanced Validation Messages */
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.form-field input.valid,
.form-field select.valid,
.form-field textarea.valid {
    border-color: #10b981 !important;
    background-color: #f0fdf4;
}

.validation-message {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.validation-message.error {
    background-color: #fee2e2;
    border: 1px solid #dc3545;
    color: #991b1b;
}

.validation-message.error strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.validation-help {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: #1e40af;
    line-height: 1.5;
}

.validation-help i {
    margin-right: 0.5rem;
    color: #3b82f6;
}

.form-validation-summary {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.form-validation-summary.error {
    background-color: #fee2e2;
    border: 2px solid #dc3545;
    color: #991b1b;
}

.form-validation-summary.error strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.form-validation-summary.error i {
    margin-right: 0.5rem;
    color: #dc3545;
}

.form-validation-summary.error small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    opacity: 0.9;
}

/* Password Requirements */
.password-requirements {
    display: block;
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

.password-requirements i {
    margin-right: 0.25rem;
    color: #3b82f6;
}

.form-field.has-error .password-requirements {
    color: #dc3545;
}

.form-field.has-error .password-requirements i {
    color: #dc3545;
}

/* Focus states for better UX */
.form-field input:focus.error,
.form-field select:focus.error,
.form-field textarea:focus.error {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-field input:focus.valid,
.form-field select:focus.valid,
.form-field textarea:focus.valid {
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

/* Animation for validation messages */
.validation-message,
.validation-help {
    animation: slideDown 0.3s ease-out;
}

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

/* (Responsive rules moved to consolidated section at end of file) */

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #003580;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success/Error Messages */
.tech-manager-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.tech-manager-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.tech-manager-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Registration Buttons Shortcode */
.tech-manager-registration-buttons {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin: 2rem 0;
}

.registration-hero-title {
    color: #003580;
    font-weight: 800;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    line-height: 1.3;
}

.registration-buttons-container {
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

.registration-buttons-container.vertical {
    flex-direction: column;
    align-items: center;
}

.registration-buttons-container.horizontal {
    flex-direction: row;
    justify-content: center;
}

.registration-button-item {
    flex: 1;
    text-align: center;
    max-width: 500px;
}

.registration-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.registration-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.registration-card-body {
    margin-bottom: 1.5rem;
}

.registration-card-heading {
    color: #1e3a8a;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.registration-card-text {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.registration-button-item .btn-registration {
    background: var(--booking-white, #ffffff);
    border: 2px solid var(--booking-blue, #003580);
    color: var(--booking-blue, #003580);
    font-weight: 600;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.registration-button-item .btn-registration:hover {
    background: var(--booking-blue, #003580);
    color: var(--booking-white, #ffffff);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.registration-button-item .btn-registration.btn-client {
    border-color: var(--booking-blue, #003580);
    color: var(--booking-blue, #003580);
}

.registration-button-item .btn-registration.btn-client:hover {
    background: var(--booking-blue, #003580);
    color: var(--booking-white, #ffffff);
}

.registration-button-item .btn-registration.btn-technician {
    border-color: var(--booking-orange, #ff6b35);
    color: var(--booking-orange, #ff6b35);
}

.registration-button-item .btn-registration.btn-technician:hover {
    background: var(--booking-orange, #ff6b35);
    color: var(--booking-white, #ffffff);
}

.registration-button-item .btn-registration i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Learn How It Works Button */
.registration-help-link {
    text-align: center;
    margin-top: 2rem;
}

.btn-learn-how {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #003580;
    border: 2px solid #003580;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-learn-how:hover {
    background: #003580;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 53, 128, 0.3);
}

.btn-learn-how i {
    font-size: 1.1rem;
}

/* Checkbox List Styling */
.tech-manager-checkbox-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    border-radius: 8px;
    background: #fff;
}

.tech-manager-checkbox-label {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.75rem !important;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    line-height: 1 !important;
}

.tech-manager-checkbox-label:hover {
    background-color: #f3f4f6;
}

.tech-manager-checkbox {
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
    accent-color: #003580;
    vertical-align: middle !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.tech-manager-checkbox-label span {
    flex: 1;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.2 !important;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    padding: 0;
}

/* Ensure checkboxes appear before text in all cases */
.tech-manager-checkbox-list label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    line-height: 1 !important;
}

.tech-manager-checkbox-list label input[type="checkbox"] {
    order: -1 !important;
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    align-self: center !important;
}

.tech-manager-checkbox-list label span,
.tech-manager-checkbox-list label:not(:has(span)) {
    order: 1 !important;
}

/* "Select all" checkbox styling - ensure it aligns with other checkboxes */
.tech-manager-select-all-label {
    font-weight: 600 !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

.tech-manager-select-all {
    order: -1 !important;
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    align-self: center !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
    accent-color: #003580;
}

/* Region Rate Row Styling - Available for Regions with Hourly Rate */
.tech-manager-regions-rates-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
}

.tech-manager-regions-rates-list .description {
    margin-bottom: 10px;
    color: #666;
    font-style: italic;
}

.region-rate-row {
    display: grid !important;
    grid-template-columns: 24px 1fr 100px !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 8px !important;
    padding: 10px 12px !important;
    background: #f9f9f9 !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    min-height: 44px !important;
}

.region-rate-row .region-checkbox {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: #003580;
    justify-self: center !important;
}

.region-rate-row > label {
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-weight: normal !important;
    color: #374151 !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    display: block !important;
}

.region-rate-row .rate-input-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
}

.region-rate-row .rate-currency {
    font-weight: 500 !important;
    color: #555 !important;
    flex-shrink: 0 !important;
    font-size: 0.95rem !important;
}

.region-rate-row .region-rate-input {
    width: 60px !important;
    padding: 6px 8px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    text-align: right !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
    height: 32px !important;
    box-sizing: border-box !important;
}

.region-rate-row .region-rate-input:disabled {
    background-color: #f0f0f0 !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

.region-rate-row .region-rate-input:focus {
    outline: none !important;
    border-color: #003580 !important;
    box-shadow: 0 0 0 2px rgba(0, 53, 128, 0.15) !important;
}

/* Checkbox validation error styling */
.tech-manager-checkbox-list.has-error,
.tech-manager-checkbox-list.error {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.form-field.has-error .tech-manager-checkbox-list {
    border-color: #dc3545 !important;
}

.checkbox-validation-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.form-field.has-error .checkbox-validation-message {
    display: block !important;
}

/* (Responsive rules moved to consolidated section at end of file) */

/* ==========================================================================
   intl-tel-input Styling
   ========================================================================== */

/* Container styling */
.iti {
    width: 100% !important;
    display: block !important;
}

/* Input field within intl-tel-input */
.iti input.intl-tel-input-field,
.iti input[type="tel"] {
    width: 100% !important;
    padding-left: 90px !important;
}

/* Flag dropdown */
.iti__flag-container {
    z-index: 10;
}

.iti__selected-flag {
    background-color: #f8f9fa;
    border-right: 1px solid #e5e7eb;
    padding: 0 10px;
}

.iti__selected-flag:hover,
.iti__selected-flag:focus {
    background-color: #e9ecef;
}

/* Dropdown list */
.iti__country-list {
    z-index: 1000 !important;
    max-height: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
}

.iti__country {
    padding: 8px 12px;
    transition: background-color 0.2s ease;
}

.iti__country:hover {
    background-color: #f3f4f6;
}

.iti__country.iti__highlight {
    background-color: #e5e7eb;
}

/* Dial code display */
.iti__selected-dial-code {
    color: #374151;
    font-weight: 500;
    margin-left: 6px;
}

/* Search input in dropdown */
.iti__search-input {
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.95rem;
}

.iti__search-input:focus {
    outline: none;
    border-bottom-color: #003580;
}

/* Validation states for intl-tel-input */
.iti.iti--invalid input {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.iti.iti--valid input {
    border-color: #10b981 !important;
    background-color: #f0fdf4;
}

/* Readonly state */
.iti input[readonly] {
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
    color: #374151 !important;
}

.iti input[readonly] + .iti__flag-container .iti__selected-flag,
.iti input[readonly] ~ .iti__country-container .iti__selected-country {
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Readonly phone display (no intl-tel-input) */
input.readonly-phone-display {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    cursor: not-allowed !important;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace !important;
    letter-spacing: 0.5px !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

input.readonly-phone-display:focus {
    outline: none !important;
    border-color: #e5e7eb !important;
    box-shadow: none !important;
}

/* Ensure proper spacing for readonly fields */
.readonly-field .iti,
.form-group .iti {
    display: block !important;
}

.readonly-field .iti input,
.form-group .iti input {
    width: 100% !important;
}

/* Form field container adjustments */
.form-field .iti,
.form-group .iti {
    margin-bottom: 0;
}

/* Ensure proper stacking in modals */
.modal .iti__country-list {
    z-index: 2000 !important;
}

/* Admin area specific styling */
.form-table .iti {
    max-width: 400px;
}

.form-table .iti input {
    margin: 0;
}

/* (intl-tel-input responsive rules moved to consolidated section at end of file) */

/* ==========================================================================
   "How did you hear about us?" Referral Source Field
   ========================================================================== */

.tech-manager-referral-sources {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    max-height: 350px;
    overflow-y: auto;
}

.referral-category {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.referral-category:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.referral-category-title {
    display: block;
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding-left: 2px;
}

.referral-option {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: normal !important;
    margin-bottom: 0.25rem !important;
}

.referral-option:hover {
    background-color: #f3f4f6;
}

.referral-option input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    accent-color: #003580;
    cursor: pointer;
}

.referral-option span {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.3;
}

.referral-other-wrapper {
    margin-top: 8px;
    padding-left: 26px;
}

.referral-other-input {
    width: 100% !important;
    max-width: 400px;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
}

.referral-other-input:focus {
    border-color: #003580 !important;
    box-shadow: 0 0 0 2px rgba(0, 53, 128, 0.15) !important;
    outline: none !important;
}

.tech-manager-referral-sources.has-error {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.form-field.has-error .tech-manager-referral-sources {
    border-color: #dc3545 !important;
}

.referral-validation-message {
    margin-top: 0.5rem;
}

/* Position Dropdown with "Other" option */
.position-dropdown-wrapper {
    width: 100%;
}

.position-dropdown-wrapper .position-select {
    width: 100%;
    max-width: 400px;
}

.position-other-wrapper {
    margin-top: 10px;
}

.position-other-wrapper .position-other-input {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.position-other-wrapper .position-other-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: none;
}

/* Admin area styles for position dropdown */
.form-table .position-dropdown-wrapper .position-select,
.form-table .position-dropdown-wrapper .position-other-input {
    max-width: 25em;
}

#poststuff .position-dropdown-wrapper .position-select,
#poststuff .position-dropdown-wrapper .position-other-input {
    width: 100%;
}

/* Terms Agreement Checkbox Field */
.terms-agreement-field {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.terms-agreement-field > label.checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px !important;
    cursor: pointer !important;
    font-weight: normal !important;
    margin-bottom: 0 !important;
    line-height: 1.5 !important;
}

.terms-agreement-field input[type="checkbox"] {
    width: auto !important;
    min-width: 18px !important;
    min-height: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 3px 0 0 0 !important;
    border: 2px solid #d1d5db !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    accent-color: #003580;
    box-shadow: none !important;
}

.terms-agreement-field input[type="checkbox"]:checked {
    border-color: #003580 !important;
}

.terms-agreement-field input[type="checkbox"]:focus {
    box-shadow: 0 0 0 2px rgba(0, 53, 128, 0.25) !important;
}

.terms-agreement-field span {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}

.terms-agreement-field span a {
    color: #003580;
    text-decoration: underline;
    font-weight: 600;
}

.terms-agreement-field span a:hover {
    color: #ff6b35;
}

/* Region Rate Validation Styles */
.region-rate-row.has-error {
    background-color: #fff5f5 !important;
    border: 2px solid #dc3545 !important;
    padding: 8px 12px !important;
    margin: 4px 0 !important;
    border-radius: 4px !important;
}

.region-rate-row.has-error .region-rate-input {
    border-color: #dc3545 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) !important;
}

/* Inline error message after each row */
.region-rate-error {
    color: #dc3545 !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    margin: 0 0 8px 0 !important;
    background-color: #fff5f5 !important;
    border-left: 3px solid #dc3545 !important;
    border-radius: 0 4px 4px 0 !important;
    display: block !important;
}

/* Summary error message above the regions list */
.regions-rates-validation-message {
    color: #dc3545 !important;
    font-size: 14px !important;
    margin-bottom: 15px !important;
    padding: 12px 15px !important;
    background-color: #fff5f5 !important;
    border: 1px solid #dc3545 !important;
    border-left: 4px solid #dc3545 !important;
    border-radius: 4px !important;
    display: block !important;
}

/* ==========================================================================
   Help Page Styles
   ========================================================================== */

.tech-manager-help-page {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 0;
}

.help-intro {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: #4b5563;
    line-height: 1.7;
}

/* Help Sections */
.help-section {
    margin-bottom: 3rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.help-section-header {
    padding: 2rem;
    text-align: center;
    color: #ffffff;
}

.help-client-section .help-section-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.help-technician-section .help-section-header {
    background: linear-gradient(135deg, #c2410c 0%, #ff6b35 100%);
}

.help-section-header i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.help-section-header h2 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0 0 0.5rem 0;
}

.help-section-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin: 0;
}

/* Steps */
.help-steps {
    padding: 2rem;
}

.help-step {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.help-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff;
}

.help-client-section .step-number {
    background: #1e3a8a;
}

.help-technician-section .step-number {
    background: #ff6b35;
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.step-content p {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

.step-content a {
    color: #003580;
    font-weight: 600;
    text-decoration: underline;
}

.step-content a:hover {
    color: #ff6b35;
}

/* CTA Section */
.help-cta {
    text-align: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    border: 1px solid #e2e8f0;
}

.help-cta h3 {
    color: #1e3a8a;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 1.5rem 0;
}

.help-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-cta-client {
    background: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
}

.btn-cta-client:hover {
    background: #ffffff;
    color: #1e3a8a;
    text-decoration: none;
}

.btn-cta-technician {
    background: #ff6b35;
    color: #ffffff;
    border-color: #ff6b35;
}

.btn-cta-technician:hover {
    background: #ffffff;
    color: #ff6b35;
    text-decoration: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN - All Breakpoints
   ========================================================================== */

/* --- Tablet Landscape (1024px and below) --- */
@media (max-width: 1024px) {
    .tech-manager-registration-buttons {
        padding: 2rem 1.5rem;
    }
    
    .registration-buttons-container.horizontal {
        gap: 1.5rem;
    }
    
    .registration-card-heading {
        font-size: 1.1rem;
    }
    
    .help-cta {
        padding: 2rem 1.5rem;
    }
}

/* --- Tablet Portrait (768px and below) --- */
@media (max-width: 768px) {
    /* Form containers */
    .tech-manager-form-container {
        padding: 1rem 0;
    }
    
    .tech-manager-search-form,
    #client-registration-form,
    #technician-registration-form {
        padding: 1.25rem;
        margin: 1rem 0.5rem;
        border-radius: 10px;
    }
    
    .tech-manager-search-form h4,
    #client-registration-form h4,
    #technician-registration-form h4 {
        font-size: 1.15rem;
        margin-bottom: 1rem;
    }
    
    /* Form grid single column on tablet */
    .tech-manager-fields {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Search & form fields */
    .search-field input,
    .search-field select,
    .form-field input,
    .form-field select,
    .form-field textarea {
        padding: 0.625rem 0.75rem;
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    /* Buttons */
    .search-actions {
        text-align: center;
    }
    
    .search-button,
    .clear-button {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .form-field input[type="submit"] {
        width: 100%;
        padding: 0.75rem;
    }
    
    /* Technician cards in search results */
    .technician-card {
        margin-bottom: 1rem;
    }
    
    .technician-card:hover {
        transform: none;
    }
    
    .technician-details p {
        font-size: 0.85rem;
    }
    
    /* Card actions - stack buttons */
    .card-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .card-actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Search filters */
    .search-filters {
        padding: 0.75rem;
    }
    
    .search-filters h3 {
        font-size: 1rem;
    }
    
    /* Modal */
    .modal-body {
        padding: 1.25rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1.25rem;
    }
    
    /* No results */
    .no-results {
        padding: 2rem 1rem;
    }
    
    .no-results i {
        font-size: 2.5rem;
    }
    
    /* Validation messages */
    .form-validation-summary {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .validation-message {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Registration buttons / homepage */
    .registration-hero-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .registration-buttons-container.horizontal {
        flex-direction: column;
        align-items: center;
    }
    
    .registration-button-item {
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    .registration-card {
        padding: 1.25rem 1rem;
    }
    
    .registration-card-heading {
        font-size: 1.05rem;
    }
    
    .registration-card-text {
        font-size: 0.9rem;
    }
    
    .tech-manager-registration-buttons {
        padding: 1.5rem 1rem;
        margin: 1rem 0;
    }
    
    .btn-learn-how {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Checkbox lists */
    .tech-manager-checkbox-list {
        max-height: 220px;
        padding: 0.75rem;
    }
    
    .tech-manager-checkbox-label {
        padding: 0.375rem;
        margin-bottom: 0.5rem !important;
    }
    
    .tech-manager-checkbox-label span {
        font-size: 0.875rem;
    }
    
    /* Region Rate Row */
    .tech-manager-regions-rates-list {
        max-height: 300px;
        padding: 8px;
    }
    
    .region-rate-row {
        grid-template-columns: 22px 1fr 85px !important;
        gap: 8px !important;
        padding: 8px 10px !important;
    }
    
    .region-rate-row > label {
        font-size: 0.85rem !important;
        white-space: normal !important;
    }
    
    .region-rate-row .region-rate-input {
        width: 52px !important;
        padding: 5px 6px !important;
        font-size: 0.85rem !important;
    }
    
    /* Position dropdown */
    .position-dropdown-wrapper .position-select {
        max-width: 100%;
    }
    
    .position-other-wrapper .position-other-input {
        max-width: 100%;
    }
    
    /* Terms agreement */
    .terms-agreement-field span {
        font-size: 0.875rem;
    }
    
    /* intl-tel-input */
    .iti input.intl-tel-input-field,
    .iti input[type="tel"] {
        padding-left: 80px !important;
    }
    
    .iti__country-list {
        max-width: calc(100vw - 40px);
    }
    
    /* Help page */
    .tech-manager-help-page {
        padding: 0.5rem;
    }
    
    .help-intro {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .help-section {
        margin-bottom: 2rem;
    }
    
    .help-section-header {
        padding: 1.25rem;
    }
    
    .help-section-header i {
        font-size: 2rem;
    }
    
    .help-section-header h2 {
        font-size: 1.3rem;
    }
    
    .help-section-subtitle {
        font-size: 0.9rem;
    }
    
    .help-steps {
        padding: 1.25rem;
    }
    
    .help-step {
        gap: 1rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1.25rem;
    }
    
    .step-number {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }
    
    .step-content h3 {
        font-size: 1rem;
    }
    
    .step-content p {
        font-size: 0.875rem;
    }
    
    .help-cta {
        padding: 1.5rem 1rem;
    }
    
    .help-cta h3 {
        font-size: 1.25rem;
    }
    
    .help-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-cta {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
    
    /* Referral source field */
    .tech-manager-referral-sources {
        max-height: 280px;
        padding: 0.75rem;
    }
    
    .referral-category-title {
        font-size: 0.85rem;
    }
    
    .referral-option span {
        font-size: 0.85rem;
    }
    
    .referral-other-wrapper {
        padding-left: 0;
    }
    
    .referral-other-input {
        max-width: 100% !important;
    }
    
    /* User profile page */
    .tech-manager-user-profile .card-body {
        padding: 1rem;
    }
    
    .tech-manager-user-profile .form-group {
        margin-bottom: 1rem;
    }
    
    /* Readonly phone display */
    input.readonly-phone-display {
        font-size: 0.875rem !important;
        padding: 0.625rem 0.75rem !important;
    }
    
    /* Badge sizing */
    .badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* --- Small Mobile (576px and below) --- */
@media (max-width: 576px) {
    .tech-manager-search-form,
    #client-registration-form,
    #technician-registration-form {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 8px;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
    
    /* Form fields */
    .search-field label,
    .form-field label {
        font-size: 0.9rem;
        margin-bottom: 0.375rem;
    }
    
    .search-field input,
    .search-field select,
    .form-field input,
    .form-field select,
    .form-field textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Contact technician button */
    .contact-technician {
        width: 100%;
        text-align: center;
    }
    
    /* Region Rate Row */
    .region-rate-row {
        grid-template-columns: 20px 1fr !important;
        gap: 6px !important;
        padding: 8px !important;
    }
    
    .region-rate-row .rate-input-wrapper {
        grid-column: 2 !important;
        justify-content: flex-start !important;
    }
    
    .region-rate-row > label {
        font-size: 0.8rem !important;
    }
    
    .region-rate-row .region-rate-input {
        width: 55px !important;
        padding: 4px 5px !important;
        font-size: 0.8rem !important;
    }
    
    .region-rate-row .region-checkbox {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        min-height: 16px !important;
    }
    
    /* Terms agreement */
    .terms-agreement-field > label.checkbox-label {
        gap: 8px !important;
    }
    
    .terms-agreement-field span {
        font-size: 0.825rem;
    }
}

/* --- Extra Small Mobile (480px and below) --- */
@media (max-width: 480px) {
    .tech-manager-form-container {
        padding: 0.5rem 0;
    }
    
    .registration-hero-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .registration-card {
        padding: 1rem 0.75rem;
    }
    
    .registration-card-heading {
        font-size: 0.95rem;
    }
    
    .registration-card-text {
        font-size: 0.85rem;
    }
    
    .tech-manager-registration-buttons {
        padding: 1rem 0.75rem;
    }
    
    .registration-button-item .btn-registration {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-learn-how {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }
    
    /* Checkbox lists */
    .tech-manager-checkbox-list {
        max-height: 200px;
    }
    
    .tech-manager-checkbox-label {
        padding: 0.25rem;
    }
    
    .tech-manager-checkbox-label span {
        font-size: 0.825rem;
    }
    
    .tech-manager-checkbox {
        width: 16px !important;
        height: 16px !important;
        margin-right: 0.5rem !important;
    }
    
    /* intl-tel-input */
    .iti input.intl-tel-input-field,
    .iti input[type="tel"] {
        padding-left: 75px !important;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Password requirements */
    .password-requirements {
        font-size: 0.8rem;
    }
    
    /* Notices */
    .tech-manager-notice {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Help page */
    .help-section-header {
        padding: 1rem;
    }
    
    .help-section-header i {
        font-size: 1.75rem;
    }
    
    .help-section-header h2 {
        font-size: 1.15rem;
    }
    
    .help-steps {
        padding: 1rem;
    }
    
    .help-step {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .step-content h3 {
        font-size: 0.95rem;
    }
    
    .step-content p {
        font-size: 0.825rem;
    }
    
    .help-cta {
        padding: 1.25rem 0.75rem;
    }
    
    .help-cta h3 {
        font-size: 1.1rem;
    }
    
    .btn-cta {
        font-size: 0.85rem;
        padding: 0.65rem 1rem;
    }
    
    /* Loading states */
    .loading::after {
        width: 16px;
        height: 16px;
        margin: -8px 0 0 -8px;
    }
    
    /* Messages */
    .tech-manager-message {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Supported models badges */
    .supported-models .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
}

/* ========================================
   Contact Form
   ======================================== */
.tech-manager-contact-form-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding-top: 1rem;
}

.tech-manager-contact-form-wrap .contact-intro-text {
    text-align: center;
    font-size: 1.25rem;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
}

#tech-manager-contact-form {
    max-width: 640px;
}

/* Remove double margin-bottom on inputs inside contact form
   (the .form-field already provides spacing) */
#tech-manager-contact-form .form-field input,
#tech-manager-contact-form .form-field select,
#tech-manager-contact-form .form-field textarea {
    margin-bottom: 0;
}

#tech-manager-contact-form .form-field select {
    appearance: auto;
    background-color: #fff;
}

#tech-manager-contact-form .form-field textarea {
    min-height: 150px;
}

.tech-manager-contact-form-wrap .contact-response-note {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 12px;
    margin-bottom: 0;
}

.tech-manager-contact-form-wrap .contact-response-note i {
    margin-right: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .tech-manager-contact-form-wrap {
        padding-left: 0;
        padding-right: 0;
    }
    #tech-manager-contact-form {
        padding: 1.25rem;
    }
    .tech-manager-contact-form-wrap .contact-intro-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    #tech-manager-contact-form {
        padding: 1rem;
    }
    .tech-manager-contact-form-wrap .contact-intro-text {
        font-size: 1rem;
    }
}
