/**
 * Nora Contact Form - Front-end Stylesheet
 * Brand Palette:
 * Primary Navy: #102A45
 * Royal Blue: #16467A
 * Accent Blue: #1E5B99
 * Light Ice Blue: #F0F6FC / #F7FAFD
 * Border Light: #D8E7F5
 * Border Focus: #16467A
 * Error Red: #D9383A
 * Success Green: #2B6CB0
 */

.nora-contact-form-container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #102A45;
    box-sizing: border-box;
}

.nora-contact-form-container *,
.nora-contact-form-container *::before,
.nora-contact-form-container *::after {
    box-sizing: border-box;
}

/* Headings */
.nora-cform-heading {
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 500;
    color: #102A45;
    margin: 0 0 0.5rem 0;
    line-height: 1.25;
}

.nora-cform-subheading {
    font-size: 1.05rem;
    color: #4A5B6D;
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

/* Form Grid */
.nora-cform-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
}

.nora-form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.nora-col-half {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 260px;
}

.nora-col-full {
    flex: 1 1 100%;
    width: 100%;
}

/* Field Labels */
.nora-field-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #102A45;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: 0.01em;
}

.nora-required {
    color: #C53030;
    font-weight: 700;
    margin-left: 2px;
}

.nora-optional {
    color: #7A8B9E;
    font-size: 0.85rem;
    font-weight: normal;
    margin-left: 4px;
}

/* Input Fields */
.nora-text-input,
.nora-select-input,
.nora-textarea-input {
    width: 100%;
    background-color: #FFFFFF;
    border: 1.5px solid #D8E7F5;
    border-radius: 6px;
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
    font-family: inherit;
    color: #102A45;
    transition: all 0.22s ease;
    outline: none;
    box-shadow: 0 1px 3px rgba(16, 42, 69, 0.02);
}

.nora-text-input:hover,
.nora-select-input:hover,
.nora-textarea-input:hover {
    border-color: #BACFE5;
}

.nora-text-input:focus,
.nora-select-input:focus,
.nora-textarea-input:focus {
    border-color: #16467A;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3.5px rgba(22, 70, 122, 0.12);
}

.nora-text-input::placeholder,
.nora-textarea-input::placeholder {
    color: #9AAEC4;
    font-size: 0.95rem;
}

.nora-textarea-input {
    resize: vertical;
    min-height: 130px;
    line-height: 1.55;
}

/* Custom Select Dropdown Arrow */
.nora-select-wrapper {
    position: relative;
    width: 100%;
}

.nora-select-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.75rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2316467A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    background-size: 16px;
}

/* Checkbox & Consent */
.nora-consent-group {
    margin-top: 0.25rem;
}

.nora-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #4A5B6D;
    user-select: none;
}

.nora-checkbox-label input[type="checkbox"] {
    position: relative;
    margin-top: 0.15rem;
    width: 18px;
    height: 18px;
    accent-color: #16467A;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.nora-checkbox-text {
    flex: 1;
}

/* Error States */
.nora-form-group.has-error .nora-text-input,
.nora-form-group.has-error .nora-select-input,
.nora-form-group.has-error .nora-textarea-input {
    border-color: #D9383A;
    background-color: #FFF8F8;
}

.nora-field-error {
    display: none;
    color: #D9383A;
    font-size: 0.83rem;
    font-weight: 500;
    margin-top: 0.35rem;
    line-height: 1.4;
}

.nora-form-group.has-error .nora-field-error {
    display: block;
    animation: noraFadeIn 0.2s ease forwards;
}

/* Submit Button */
.nora-submit-wrap {
    margin-top: 0.5rem;
}

.nora-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #16467A;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 0.95rem 2.2rem;
    font-size: 1.02rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(22, 70, 122, 0.2);
    min-height: 48px;
    text-decoration: none;
}

.nora-btn-submit:hover {
    background: #102A45;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 42, 69, 0.28);
}

.nora-btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 42, 69, 0.2);
}

.nora-btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.nora-btn-icon svg {
    transition: transform 0.2s ease;
}

.nora-btn-submit:hover .nora-btn-icon svg {
    transform: translateX(3px);
}

/* Loading Spinner */
.nora-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: noraSpin 0.75s infinite linear;
    display: inline-block;
}

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

@keyframes noraFadeIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Alert Notification Cards */
.nora-cform-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    animation: noraFadeIn 0.35s ease forwards;
}

.nora-cform-success {
    background-color: #F0F7FD;
    border: 1.5px solid #BACFE5;
    color: #102A45;
}

.nora-cform-error {
    background-color: #FDF2F2;
    border: 1.5px solid #F5C6CB;
    color: #9B1C1C;
}

.nora-alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.nora-alert-title {
    margin: 0 0 0.3rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #102A45;
}

.nora-alert-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #4A5B6D;
}

/* Responsive */
@media (max-width: 640px) {
    .nora-col-half {
        flex: 1 1 100%;
    }
    
    .nora-btn-submit {
        width: 100%;
    }
}
