/* Appointment Form Styles */
.appointment-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    min-height: calc(100vh - 200px);
    position: relative;
}

.appointment-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.appointment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.appointment-header {
    text-align: center;
    margin-bottom: 50px;
}

.appointment-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
}

.appointment-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

.appointment-description {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.appointment-form-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 50px;
    position: relative;
    overflow: hidden;
}

.appointment-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #e74c3c, #f39c12);
}

.appointment-form {
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95rem;
    position: relative;
}

.form-label.required::after {
    content: '*';
    color: #e74c3c;
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3498db;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-error::before {
    content: '⚠';
    font-size: 0.75rem;
}

.submit-button {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 20px;
}

.submit-button::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;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
}

.submit-button:active {
    transform: translateY(-1px);
}

.success-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 5px solid #28a745;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInDown 0.5s ease;
}

.success-message::before {
    content: '✓';
    font-size: 1.2rem;
    font-weight: bold;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .appointment-section {
        padding: 40px 0;
    }
    
    .appointment-container {
        padding: 0 15px;
    }
    
    .appointment-title {
        font-size: 2rem;
    }
    
    .appointment-form-container {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .submit-button {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .appointment-title {
        font-size: 1.75rem;
    }
    
    .appointment-form-container {
        padding: 25px 15px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 10px 12px;
    }
}

/* Loading State */
.submit-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.submit-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Form Validation States */
.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.form-input.success,
.form-select.success,
.form-textarea.success {
    border-color: #28a745;
    background: #f0fff4;
}

/* Navigation Active State Fix */
.nav-link.active,
.mobile-nav-link.active {
    background: linear-gradient(135deg, #3498db, #2ecc71) !important;
    color: white !important;
    border-radius: 8px;
    padding: 8px 16px !important;
    transition: all 0.3s ease;
}

.nav-link.active:hover,
.mobile-nav-link.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Admin Status Buttons */
.status-buttons .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.status-buttons .btn {
    flex: 1;
    min-width: 120px;
    border-radius: 8px !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid;
}

.status-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-buttons .btn-check:checked + .btn {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.status-buttons .btn-check:checked + .btn-outline-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.status-buttons .btn-check:checked + .btn-outline-success {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.status-buttons .btn-check:checked + .btn-outline-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.status-buttons .btn-check:checked + .btn-outline-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: #000;
}

@media (max-width: 768px) {
    .status-buttons .btn {
        min-width: 100px;
        font-size: 0.875rem;
    }
}

/* Custom Checkbox and Radio Styles */
.form-checkbox,
.form-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 10px;
}

.form-checkbox input,
.form-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.form-checkbox .checkmark,
.form-radio .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
}

.form-radio .checkmark {
    border-radius: 50%;
}

.form-checkbox:hover .checkmark,
.form-radio:hover .checkmark {
    border-color: #3498db;
    background: #e3f2fd;
}

.form-checkbox input:checked ~ .checkmark,
.form-radio input:checked ~ .checkmark {
    background: #3498db;
    border-color: #3498db;
}

.form-checkbox .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-radio .checkmark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-checkbox input:checked ~ .checkmark::after,
.form-radio input:checked ~ .checkmark::after {
    opacity: 1;
}

/* Map Toggle Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 15px 20px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.checkbox-label:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.map-toggle-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3498db;
}

.checkbox-text {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
    user-select: none;
}

.checkbox-label:has(.map-toggle-checkbox:checked) {
    border-color: #3498db;
    background: #e3f2fd;
}

.checkbox-label:has(.map-toggle-checkbox:checked) .checkbox-text {
    color: #2980b9;
    font-weight: 600;
}

/* Address Section Styles */
.address-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    border: 2px solid #e9ecef;
    position: relative;
}

.address-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 15px 15px 0 0;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '📍';
    font-size: 1.2rem;
}

.section-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Google Maps Autocomplete Styles */
.pac-container {
    border-radius: 12px !important;
    border: 2px solid #e9ecef !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    margin-top: 5px !important;
    font-family: inherit !important;
    z-index: 1000 !important;
}

/* City and State Autocomplete Styles */
.city-autocomplete .pac-container,
.state-autocomplete .pac-container {
    border-radius: 12px !important;
    border: 2px solid #e9ecef !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    margin-top: 5px !important;
    font-family: inherit !important;
    z-index: 1000 !important;
}

/* Ensure city and state inputs have consistent styling with autocomplete */
#city:focus,
#state:focus {
    border-color: #3498db !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
    transform: translateY(-2px) !important;
}

/* Autocomplete indicator for city and state fields */
.city-autocomplete .form-label::after,
.state-autocomplete .form-label::after {
    content: ' 🔍';
    font-size: 0.8rem;
    opacity: 0.7;
    margin-left: 5px;
}

/* Enhanced autocomplete styling for better visibility */
.pac-item {
    padding: 15px 20px !important;
    border-bottom: 1px solid #f1f3f4 !important;
    font-size: 0.95rem !important;
    color: #2c3e50 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.pac-item:hover {
    background-color: #f8f9fa !important;
    transform: translateX(2px) !important;
}

.pac-item-selected {
    background-color: #e3f2fd !important;
    border-left: 4px solid #3498db !important;
    padding-left: 16px !important;
}

.pac-matched {
    font-weight: 600 !important;
    color: #3498db !important;
    background-color: rgba(52, 152, 219, 0.1) !important;
    padding: 1px 3px !important;
    border-radius: 3px !important;
}

.pac-item-query {
    color: #2c3e50 !important;
    font-weight: 500 !important;
}

/* Loading state for autocomplete */
.city-autocomplete.loading .form-input,
.state-autocomplete.loading .form-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M10 6a4 4 0 100 8 4 4 0 000-8z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 16px !important;
    padding-right: 45px !important;
}

/* Success state for autocomplete */
.city-autocomplete.success .form-input,
.state-autocomplete.success .form-input {
    border-color: #28a745 !important;
    background-color: #f0fff4 !important;
}

.city-autocomplete.success .form-label::after,
.state-autocomplete.success .form-label::after {
    content: ' ✓';
    color: #28a745;
    opacity: 1;
}

/* New PlaceAutocompleteElement dropdown styles */
gmp-place-autocomplete .pac-container {
    border-radius: 12px !important;
    border: 2px solid #e9ecef !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    margin-top: 5px !important;
    font-family: inherit !important;
    z-index: 1000 !important;
}

/* New PlaceAutocompleteElement Styles */
gmp-place-autocomplete {
    width: 100%;
    display: block;
}

gmp-place-autocomplete input {
    width: 100% !important;
    padding: 15px 20px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    background: #f8f9fa !important;
    background-color: #f8f9fa !important;
    color: #2c3e50 !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

gmp-place-autocomplete input:focus {
    outline: none !important;
    border-color: #3498db !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
    transform: translateY(-2px) !important;
}

gmp-place-autocomplete input::placeholder {
    color: #adb5bd !important;
    font-style: italic !important;
}

gmp-place-autocomplete input:hover {
    background: #f8f9fa !important;
    background-color: #f8f9fa !important;
}

/* Override any dark theme styles */
gmp-place-autocomplete input[style*="background"] {
    background: #f8f9fa !important;
    background-color: #f8f9fa !important;
}

/* Additional aggressive overrides for Google Maps styling */
gmp-place-autocomplete input,
gmp-place-autocomplete input[type="text"],
gmp-place-autocomplete input[type="search"] {
    background: #f8f9fa !important;
    background-color: #f8f9fa !important;
    background-image: none !important;
    color: #2c3e50 !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Override any inline styles that might be applied */
gmp-place-autocomplete input[style] {
    background: #f8f9fa !important;
    background-color: #f8f9fa !important;
    color: #2c3e50 !important;
}

/* Ensure the autocomplete element matches the form styling */
.address-section gmp-place-autocomplete {
    margin-bottom: 0;
}

.address-section gmp-place-autocomplete input {
    border-color: #e9ecef !important;
}

.address-section gmp-place-autocomplete input:focus {
    border-color: #2ecc71 !important;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1) !important;
}

.pac-item {
    padding: 12px 15px !important;
    border-bottom: 1px solid #f1f3f4 !important;
    font-size: 0.95rem !important;
    color: #2c3e50 !important;
    transition: background-color 0.2s ease !important;
}

.pac-item:hover {
    background-color: #f8f9fa !important;
}

.pac-item-selected {
    background-color: #e3f2fd !important;
}

.pac-matched {
    font-weight: 600 !important;
    color: #3498db !important;
}

.pac-item-query {
    color: #2c3e50 !important;
}

/* Address Field Highlighting */
.address-section .form-input:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

/* Map Selection Section Styles */
.map-selection-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    border: 2px solid #e9ecef;
    position: relative;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.map-selection-section[style*="display: none"] {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* Location Options Styles */
.location-options {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.location-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #ffffff;
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    user-select: none;
    min-width: 180px;
    justify-content: center;
}

.location-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.location-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.2);
}

.location-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.location-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e9ecef;
    background: #ffffff;
}

.current-location-btn {
    border-color: #2ecc71;
    color: #27ae60;
}

.current-location-btn:hover {
    border-color: #2ecc71;
    background: #d5f4e6;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.15);
}

.manual-location-btn {
    border-color: #3498db;
    color: #2980b9;
}

.manual-location-btn:hover {
    border-color: #3498db;
    background: #e3f2fd;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.location-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* Responsive Location Options */
@media (max-width: 768px) {
    .location-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .location-btn {
        min-width: auto;
        width: 100%;
        padding: 15px 20px;
        font-size: 1rem;
    }
}

.map-selection-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 15px 15px 0 0;
}

.map-container {
    position: relative;
    margin-bottom: 15px;
}

.map-coordinates {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 10px;
}

.map-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.coordinate-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coordinate-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

#selected-coordinates {
    color: #3498db;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.google-maps-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.google-maps-btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.google-maps-btn .btn-icon {
    font-size: 1rem;
}

.clear-location-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-location-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* Google Maps styling */
#map {
    border-radius: 12px !important;
    overflow: hidden;
}

/* Responsive Address Section */
@media (max-width: 768px) {
    .address-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .section-description {
        font-size: 0.9rem;
    }
    
    .map-selection-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .map-coordinates {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .map-buttons {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }
    
    .google-maps-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .clear-location-btn {
        padding: 6px 12px;
    }
}
