/**
 * HouseCall Pro Booking Form - Public Styles (Updated Design)
 */

.hcp-form-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: white;
    border: 3px solid #ffa726;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.hcp-form-header {
    background: white;
    color: #4a90e2;
    padding: 25px 25px 15px 25px;
    text-align: left;
}

.hcp-form-header .hcp-tagline {
    font-size: 14px;
    margin-bottom: 8px;
    color: #4a90e2;
    font-weight: 400;
}

.hcp-form-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 0;
    color: #4a90e2;
    line-height: 1.1;
}

.hcp-form-header .hcp-subtitle {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 0;
    color: #4a90e2;
}

.hcp-form-header .hcp-description {
    display: none; /* Hide description for cleaner look */
}

.hcp-form-body {
    padding: 0 25px 25px 25px;
    background: white;
}

.hcp-form-group {
    margin-bottom: 12px;
}

.hcp-form-group input,
.hcp-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 15px;
    color: #374151;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.hcp-form-group input::placeholder {
    color: #9ca3af;
    font-size: 15px;
}

.hcp-form-group select {
    color: #9ca3af;
    font-size: 15px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239ca3af' d='M8 12L3 7h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 40px;
}

.hcp-form-group input:focus,
.hcp-form-group select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.hcp-form-group select:focus,
.hcp-form-group select:valid {
    color: #374151;
}

.hcp-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 20px 0;
    font-size: 12px;
    line-height: 1.3;
    color: #6b7280;
}

.hcp-checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.0);
    accent-color: #4a90e2;
    flex-shrink: 0;
    margin-top: 1px;
}

.hcp-checkbox-group label {
    flex: 1;
    cursor: pointer;
}

.hcp-submit-btn {
    width: 100%;
    background: #4a90e2;
    color: white;
    border: none;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 0;
}

.hcp-submit-btn:hover {
    background: #357abd;
}

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

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

.hcp-powered-by {
    display: none; /* Hide powered by text to match the clean design */
}

.hcp-success-message {
    text-align: center;
    padding: 30px 25px;
    background: white;
}

.hcp-success-message.show {
    display: block !important;
}

.hcp-success-message h2 {
    color: #4a90e2;
    margin-bottom: 12px;
    font-size: 22px;
    margin-top: 0;
    font-weight: 600;
}

.hcp-success-message p {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.4;
    font-size: 14px;
}

.hcp-book-now-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.hcp-book-now-btn:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

/* Loading state */
.hcp-form-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.hcp-form-container.loading .hcp-submit-btn::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Error states */
.hcp-form-group.error input,
.hcp-form-group.error select {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.hcp-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.hcp-success-alert {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 480px) {
    .hcp-form-container {
        margin: 15px;
        border-radius: 10px;
        border-width: 2px;
        max-width: none;
    }
    
    .hcp-form-header {
        padding: 20px 20px 12px 20px;
    }
    
    .hcp-form-header h1 {
        font-size: 24px;
    }
    
    .hcp-form-header .hcp-tagline {
        font-size: 13px;
    }
    
    .hcp-form-header .hcp-subtitle {
        font-size: 15px;
    }
    
    .hcp-form-body {
        padding: 0 20px 20px 20px;
    }
    
    .hcp-form-group input,
    .hcp-form-group select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 14px;
    }
    
    .hcp-checkbox-group {
        font-size: 11px;
        margin: 14px 0 18px 0;
    }
    
    .hcp-submit-btn {
        padding: 14px 18px;
        font-size: 14px;
    }
}

/* WordPress theme compatibility */
.hcp-form-container * {
    box-sizing: border-box;
}

.hcp-form-container input,
.hcp-form-container select,
.hcp-form-container button {
    font-family: inherit;
}

/* Override common theme styles */
.hcp-form-container input[type="text"],
.hcp-form-container input[type="email"],
.hcp-form-container input[type="tel"],
.hcp-form-container select {
    height: auto;
    max-width: 100%;
    line-height: normal;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.hcp-form-container button {
    border: none;
    text-shadow: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

/* Additional styling for better form appearance */
.hcp-form-container input[type="text"]:focus,
.hcp-form-container input[type="email"]:focus,
.hcp-form-container input[type="tel"]:focus {
    outline: none;
}

/* Make sure select dropdown arrow appears correctly */
.hcp-form-group select option {
    color: #333;
    background: white;
    padding: 8px;
}

.hcp-form-group select option:first-child {
    color: #999;
}