/**
 * Contact Page Styles
 * Scoped to .page-contact and body.page-template-template-contact
 * Maintains 1:1 layout from static/contact-us.html while using theme design system
 */

/* Scoped to contact page */
.page-contact,
body.page-template-template-contact {
    /* Inherit theme typography and spacing */
}

/* Map Block */
.page-contact .block-map {
    margin-bottom: 0;
}

.page-contact .block-map__body {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.page-contact .block-map__body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Page Header */
.page-contact .page-header {
    padding: 40px 0;
    background-color: #f7f8fa;
}

/* Removed: page-header__title no longer exists */

/* Contact Form Section */
.page-contact .contact-us {
    padding: 40px;
}

.page-contact .contact-us__header {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 24px;
    color: #3d464d;
}

.page-contact .contact-us__address {
    font-size: 14px;
    line-height: 1.75;
    color: #6c757d;
}

.page-contact .contact-us__address p {
    margin-bottom: 20px;
}

.page-contact .contact-us__address strong {
    color: #3d464d;
    font-weight: 500;
}

.page-contact .contact-us__address a {
    color: #3d464d;
    text-decoration: none;
}

.page-contact .contact-us__address a:hover {
    text-decoration: underline;
}

/* Form Styles */
.page-contact .contact-form {
    margin-top: 0;
}

.page-contact .form-group {
    margin-bottom: 20px;
}

.page-contact .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #3d464d;
    font-size: 14px;
}

.page-contact .form-group label .required {
    color: #dc3545;
    margin-left: 2px;
}

.page-contact .form-control {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #3d464d;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.page-contact .form-control:focus {
    outline: 0;
    border-color: rgba(17, 112, 118, 1);
    box-shadow: 0 0 0 0.2rem rgba(255, 211, 51, 0.25);
}

.page-contact .form-control.is-invalid {
    border-color: #dc3545;
}

.page-contact .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.page-contact .form-group.has-error .form-control {
    border-color: #dc3545;
}

/* Error Messages */
.page-contact .field-error {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 12px;
    color: #dc3545;
}

.page-contact .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 12px;
    color: #dc3545;
}

/* Error Summary */
.page-contact .contact-form__errors {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 4px;
    font-size: 14px;
}

.page-contact .contact-form__errors.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.page-contact .contact-form__errors.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.page-contact .contact-form__errors ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.page-contact .contact-form__errors li {
    margin-bottom: 4px;
}

/* Button (using theme .btn system) */
.page-contact .btn-primary {
    margin-top: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}

/* Success Modal */
.page-contact .contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-contact .contact-modal[style*="display: none"] {
    display: none !important;
}

.page-contact .contact-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.page-contact .contact-modal__dialog {
    position: relative;
    width: 90%;
    max-width: 500px;
    z-index: 10000;
}

.page-contact .contact-modal__content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.page-contact .contact-modal__header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-contact .contact-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #3d464d;
}

.page-contact .contact-modal__close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
}

.page-contact .contact-modal__close:hover {
    background-color: #f7f8fa;
}

.page-contact .contact-modal__close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.page-contact .contact-modal__body {
    padding: 24px;
    font-size: 14px;
    line-height: 1.6;
    color: #3d464d;
}

.page-contact .contact-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

.page-contact .contact-modal__close-btn {
    min-width: 100px;
}

/* Responsive */
@media (max-width: 991.98px) {
    .page-contact .contact-us {
        padding: 24px;
    }
    
    .page-contact .contact-us__header {
        font-size: 18px;
    }
}

@media (max-width: 575.98px) {
    .page-contact .contact-us {
        padding: 16px;
    }
    
    .page-contact .contact-modal__dialog {
        width: 95%;
        margin: 20px;
    }
    
    .page-contact .contact-modal__header,
    .page-contact .contact-modal__body,
    .page-contact .contact-modal__footer {
        padding: 16px;
    }
}

/* Focus management for accessibility */
.page-contact .contact-modal:focus {
    outline: none;
}

.page-contact .contact-modal__content:focus {
    outline: 2px solid #ffd333;
    outline-offset: 2px;
}


