/**
 * GRHD Contact Form Styles
 */

.grhd-contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

/* When embedded in contact page, remove card styling and make full width */
.contact-right-column .grhd-contact-form-wrapper {
    max-width: 100%;
    margin: 0;
}

.grhd-contact-form {
    background: #fff;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Remove white background when in contact page */
.contact-right-column .grhd-contact-form {
    background: transparent;
}

/* When used standalone (not in contact page), add card styling */
body:not(.page-template-template-contact) .grhd-contact-form {
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.grhd-form-row {
    margin-bottom: 20px;
}

.grhd-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.grhd-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.grhd-form-group label .required {
    color: #d41111;
}

.grhd-form-group input[type="text"],
.grhd-form-group input[type="email"],
.grhd-form-group input[type="tel"],
.grhd-form-group select,
.grhd-form-group textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    width: 100%;
}

.grhd-form-group input:focus,
.grhd-form-group select:focus,
.grhd-form-group textarea:focus {
    outline: none;
    border-color: #d41111;
}

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

.grhd-file-upload-wrapper {
    display: flex;
    flex-direction: column;
}

.grhd-form-group input[type="file"] {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #f9f9f9;
}

.grhd-form-group input[type="file"]:hover {
    border-color: #d41111;
    background: #fff;
}

.grhd-file-info {
    margin-top: 10px;
}

.grhd-file-help {
    font-size: 13px;
    color: #666;
    margin: 5px 0;
}

.grhd-file-selected {
    font-size: 14px;
    color: #333;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-top: 10px;
}

.grhd-file-selected .filename {
    color: #d41111;
    font-weight: 600;
}

.grhd-submit-btn {
    background: #d41111;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.grhd-submit-btn:hover {
    background: #b00e0e;
}

.grhd-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.grhd-form-response {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 15px;
}

.grhd-form-response.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.grhd-form-response.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.grhd-form-response:empty {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    body:not(.page-template-template-contact) .grhd-contact-form {
        padding: 20px;
    }

    .grhd-form-row-2col {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .grhd-submit-btn {
        width: 100%;
    }
}
