/**
 * NHO Contact Form - Frontend Styles
 * 
 * Uses fonts and colors from NHO Enterprise theme
 * @package NHO_Contact_Form
 */

/* Import Google Fonts - Matching NHO Theme */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

/* Variables - Matching NHO Enterprise Theme */
:root {
    --nho-primary: #001C48;
    --nho-secondary: #3CA19D;
    --nho-accent: #F9B41B;
    --nho-text: #334155;
    --nho-light-bg: #F4F4F4;
    --nho-white: #ffffff;
    --nho-border: #d0d0d0;
    --nho-error: #dc3545;
    --nho-success: #28a745;
    --nho-shadow: 0 4px 20px rgba(0, 28, 72, 0.1);
    --nho-radius: 8px;
    --nho-transition: all 0.3s ease;
}

/* Main Wrapper - Force NHO fonts */
.nho-contact-form-wrapper {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: #334155 !important;
    line-height: 1.6;
}

/* All text inside wrapper uses Open Sans */
.nho-contact-form-wrapper * {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Header */
.nho-contact-header {
    text-align: center;
    margin-bottom: 30px;
}

.nho-contact-title {
    font-family: 'Montserrat', 'Open Sans', sans-serif !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #001C48 !important;
    margin: 0;
    position: relative;
    display: inline-block;
    line-height: 1.3;
}

.nho-contact-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3CA19D, #F9B41B) !important;
    border-radius: 2px;
}

/* Container */
.nho-contact-container {
    background: #F4F4F4 !important;
    border-radius: var(--nho-radius);
    box-shadow: var(--nho-shadow);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
}

.nho-contact-container.with-photo {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
}

/* Founder Section */
.nho-founder-section {
    background: linear-gradient(180deg, #001C48 0%, #1e293b 100%) !important;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.nho-founder-image-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    max-width: 220px;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.nho-founder-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Form Section */
.nho-form-section {
    padding: 30px 40px;
    background: #ffffff !important;
}

.nho-form-subtitle {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 1.1rem !important;
    color: #334155 !important;
    margin: 0 0 25px;
    text-align: center;
}

/* Form Elements */
.nho-contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nho-form-row {
    display: flex;
    gap: 15px;
}

.nho-form-row-three {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: 15px;
}

.nho-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nho-form-group-title {
    flex: 0 0 100px;
}

.nho-form-group label {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #001C48 !important;
    margin-bottom: 6px;
}

.nho-form-group label .required {
    color: #dc3545 !important;
}

.nho-form-group input,
.nho-form-group select,
.nho-form-group textarea {
    padding: 12px 15px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-size: 1rem !important;
    border: 2px solid #d0d0d0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #334155 !important;
    transition: all 0.3s ease;
}

.nho-form-group input:focus,
.nho-form-group select:focus,
.nho-form-group textarea:focus {
    outline: none !important;
    border-color: #3CA19D !important;
    box-shadow: 0 0 0 3px rgba(60, 161, 157, 0.15) !important;
}

.nho-form-group input:hover,
.nho-form-group select:hover,
.nho-form-group textarea:hover {
    border-color: #3CA19D !important;
}

.nho-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.nho-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23334155' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px !important;
}

/* Error States */
.nho-form-group.has-error input,
.nho-form-group.has-error select,
.nho-form-group.has-error textarea {
    border-color: #dc3545 !important;
}

.nho-form-group .error-message {
    font-family: 'Open Sans', sans-serif !important;
    color: #dc3545 !important;
    font-size: 0.85rem !important;
    margin-top: 5px;
}

/* Submit Button */
.nho-form-submit {
    margin-top: 10px;
}

.nho-submit-btn {
    width: 100%;
    padding: 14px 30px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #001C48 !important;
    background: #F9B41B !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nho-submit-btn:hover {
    background: #3CA19D !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(60, 161, 157, 0.4);
}

.nho-submit-btn:active {
    transform: translateY(0);
}

.nho-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.nho-submit-btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: nho-spin 0.8s linear infinite;
}

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

/* Messages */
.nho-form-messages {
    font-family: 'Open Sans', sans-serif !important;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.95rem !important;
}

.nho-form-messages.success {
    background-color: #d4edda !important;
    border: 1px solid #c3e6cb !important;
    color: #155724 !important;
}

.nho-form-messages.error {
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    color: #721c24 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nho-contact-form-wrapper {
        margin: 20px 15px;
    }

    .nho-contact-container.with-photo {
        grid-template-columns: 1fr;
    }

    .nho-founder-section {
        padding: 25px;
    }

    .nho-founder-image-wrapper {
        max-width: 180px;
    }

    .nho-form-section {
        padding: 25px 20px;
    }

    .nho-form-row,
    .nho-form-row-three {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .nho-form-group-title {
        flex: 1;
    }

    .nho-contact-title {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 480px) {
    .nho-contact-header {
        margin-bottom: 20px;
    }

    .nho-contact-title {
        font-size: 1.4rem !important;
    }

    .nho-form-section {
        padding: 20px 15px;
    }

    .nho-submit-btn {
        font-size: 1rem !important;
        padding: 12px 20px !important;
    }
}

/* Widget Specific Styles */
.nho-contact-widget .nho-contact-form-wrapper {
    margin: 0;
    max-width: 100%;
}

.nho-contact-widget .nho-contact-container.with-photo {
    grid-template-columns: 1fr;
}

.nho-contact-widget .nho-founder-section {
    display: none;
}

.nho-contact-widget .nho-form-section {
    padding: 20px;
}

/* Print Styles */
@media print {
    .nho-contact-form-wrapper {
        display: none;
    }
}