/* Contact Form 7 Styling - Psychotherapy Portfolio Theme */
/* Simplified for Contact Form 7 only approach */

/* Main form container */
.wpcf7 {
    margin: 0;
}

/* Form groups and labels */
.wpcf7-form p {
    margin-bottom: 1.5rem;
}

.wpcf7-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 1rem;
}

/* Input fields styling */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="date"],
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form input[type="number"]:focus,
.wpcf7-form input[type="date"]:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    outline: none;
    border-color: #7C9A92;
    box-shadow: 0 0 0 3px rgba(124, 154, 146, 0.1);
}

/* Textarea specific styling */
.wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Submit button styling */
.wpcf7-form input[type="submit"] {
    background-color: #7C9A92;
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.wpcf7-form input[type="submit"]:hover {
    background-color: #6B8B83;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 154, 146, 0.3);
}

.wpcf7-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Response messages */
.wpcf7-response-output {
    border: none !important;
    padding: 1rem !important;
    margin: 1rem 0 0 0 !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
}

.wpcf7-mail-sent-ok {
    background-color: #d4edda !important;
    color: #155724 !important;
    border-left: 4px solid #28a745 !important;
}

.wpcf7-mail-sent-ng,
.wpcf7-aborted,
.wpcf7-validation-errors {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-left: 4px solid #dc3545 !important;
}

.wpcf7-spam-blocked {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border-left: 4px solid #ffc107 !important;
}

/* Validation error styling */
.wpcf7-not-valid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Checkbox and radio button styling */
.wpcf7-form input[type="checkbox"],
.wpcf7-form input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: #7C9A92;
}

.wpcf7-form .wpcf7-list-item {
    margin: 0.5rem 0;
}

.wpcf7-form .wpcf7-list-item label {
    display: inline;
    margin-left: 0.5rem;
    font-weight: normal;
}

/* File upload styling */
.wpcf7-form input[type="file"] {
    padding: 0.5rem;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
    cursor: pointer;
}

.wpcf7-form input[type="file"]:hover {
    border-color: #7C9A92;
    background-color: rgba(124, 154, 146, 0.05);
}

/* Select dropdown styling */
.wpcf7-form select {
    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='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    appearance: none;
}

/* Spinner/loading styling */
.wpcf7-spinner {
    visibility: hidden;
    display: inline-block;
    background-color: #7C9A92;
    opacity: 0.75;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 100%;
    padding: 0;
    margin: 0 24px;
    position: relative;
}

.wpcf7-spinner::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 100%;
    transform-origin: 8px 8px;
    animation: wpcf7-spin 1s linear infinite;
}

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

.wpcf7-form.submitting .wpcf7-spinner {
    visibility: visible;
}

/* Mobile responsive styling */
@media (max-width: 768px) {
    .wpcf7-form {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .wpcf7-form input[type="submit"] {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .wpcf7-form input[type="text"],
    .wpcf7-form input[type="email"],
    .wpcf7-form input[type="tel"],
    .wpcf7-form input[type="url"],
    .wpcf7-form input[type="number"],
    .wpcf7-form input[type="date"],
    .wpcf7-form textarea,
    .wpcf7-form select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Integration with existing theme sections */
.contact-section-block .wpcf7-form,
.section .wpcf7-form {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Custom styling for different form layouts */
.wpcf7-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wpcf7-form .form-row .form-col {
    flex: 1;
}

.wpcf7-form .form-row .form-col p {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .wpcf7-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .wpcf7-form .form-row .form-col p {
        margin-bottom: 1.5rem;
    }
}

/* Accessibility improvements */
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    outline: 2px solid #7C9A92;
    outline-offset: 2px;
}

/* Remove default CF7 styling that might conflict */
.wpcf7-form p {
    margin-bottom: 1.5rem;
}

.wpcf7-form br {
    display: none;
}

/* Ensure consistent typography */
.wpcf7-form,
.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form select,
.wpcf7-form label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
} 

/* Integration with contact section layout */
.contact-section .contact-form-7-container .wpcf7-form {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: none;
}

/* Simplify Contact Form 7 for clean design like the reference image */
.contact-section .wpcf7-form p {
    margin-bottom: 1.5rem !important;
    display: block !important;
}

/* Remove any complex styling and make it simple */
.contact-section .wpcf7-form .form-row,
.contact-section .wpcf7-form .form-col {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Hide any fancy elements that make it look complex */
.contact-section .wpcf7-form select[multiple],
.contact-section .wpcf7-form .wpcf7-list-item,
.contact-section .wpcf7-form input[type="checkbox"],
.contact-section .wpcf7-form input[type="radio"] {
    display: none !important;
}

.contact-section .contact-form .contact-form-7-container {
    padding: 0;
}

/* Ensure Contact Form 7 fields match the contact section styling - Simple and clean */
.contact-section .wpcf7-form input[type="text"],
.contact-section .wpcf7-form input[type="email"],
.contact-section .wpcf7-form input[type="tel"],
.contact-section .wpcf7-form input[type="url"],
.contact-section .wpcf7-form input[type="number"],
.contact-section .wpcf7-form textarea {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 0.875rem !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Hide select dropdowns in contact section to keep it simple */
.contact-section .wpcf7-form select {
    display: none !important;
}

.contact-section .wpcf7-form input[type="text"]:focus,
.contact-section .wpcf7-form input[type="email"]:focus,
.contact-section .wpcf7-form input[type="tel"]:focus,
.contact-section .wpcf7-form input[type="url"]:focus,
.contact-section .wpcf7-form input[type="number"]:focus,
.contact-section .wpcf7-form textarea:focus,
.contact-section .wpcf7-form select:focus {
    background: #fff;
    border-color: #7C9A92;
    box-shadow: 0 0 0 3px rgba(124, 154, 146, 0.1);
    outline: none;
}

/* Match the contact section's button styling */
.contact-section .wpcf7-form input[type="submit"] {
    background: linear-gradient(135deg, #7C9A92, #6B8B83);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    width: 100%;
}

.contact-section .wpcf7-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 154, 146, 0.3);
    background: linear-gradient(135deg, #6B8B83, #5A7A72);
}

.contact-section .wpcf7-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Contact Form 7 labels to match contact section style */
.contact-section .wpcf7-form label {
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Ensure simple, clean label styling */
.contact-section .wpcf7-form p label {
    font-size: 0.9rem !important;
    color: #333 !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

/* Response messages in contact section */
.contact-section .wpcf7-response-output {
    border-radius: 8px !important;
    margin-top: 1rem !important;
    padding: 1rem !important;
}

.contact-section .wpcf7-mail-sent-ok {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

.contact-section .wpcf7-mail-sent-ng,
.contact-section .wpcf7-aborted,
.contact-section .wpcf7-validation-errors {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
}

/* Specific textarea styling for contact section */
.contact-section .wpcf7-form textarea {
    min-height: 120px !important;
    resize: vertical !important;
    font-family: inherit !important;
}

/* Remove any default Contact Form 7 complex styling */
.contact-section .wpcf7-form br {
    display: none !important;
}

.contact-section .wpcf7-form .wpcf7-validates-as-required {
    /* Remove any special required field styling */
}

/* Mobile adjustments for contact section CF7 integration */
@media (max-width: 768px) {
    .contact-section .wpcf7-form input[type="submit"] {
        padding: 1rem;
        font-size: 1.1rem;
    }
} 

/* Force load Contact Form 7 styles even if auto-detection fails */
body .wpcf7 {
    font-family: inherit;
}

/* Override any theme conflicts */
.contact-section .wpcf7-form p {
    margin-bottom: 1.5rem !important;
}

.contact-section .wpcf7-form input,
.contact-section .wpcf7-form textarea,
.contact-section .wpcf7-form select {
    width: 100% !important;
    max-width: none !important;
}

/* Ensure proper display of Contact Form 7 in contact section */
.contact-form-7-container {
    width: 100%;
}

.contact-form-7-container .wpcf7 {
    width: 100%;
}

/* Fix for any potential flexbox issues */
.contact-section .grid-2 .contact-form {
    display: flex;
    flex-direction: column;
}

/* Make sure form takes full width of its container */
.contact-section .contact-form-7-container .wpcf7-form {
    width: 100%;
}

/* Styling for fallback message when no shortcode is provided */
.contact-section .no-form-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.contact-section .no-form-message p {
    margin: 0.5rem 0;
}

.contact-section .no-form-message strong {
    color: #333;
}

/* Additional positioning and layering fixes */
.contact-section .contact-form-7-container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    overflow: visible;
    /* Add card styling to match the design */
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
}

/* Form conflict prevention rules removed - no custom form exists */

/* Prevent form submission conflicts */
.contact-section .contact-form-7-container .wpcf7-form {
    position: relative;
    z-index: 10;
    background: transparent;
    padding: 2rem;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}