/* =========================================================
   Contact Page / Symfony Form
   Zafer Mızrak Makine
   ========================================================= */

.contact-form.left-box {
    position: relative;
}

.contact-form-right-box .pbmit-ihbox-style-7 .pbmit-heading-desc a {
    color: rgba(255, 255, 255, 0.76);
    text-decoration: none;
}

.contact-form-right-box .pbmit-ihbox-style-7 .pbmit-heading-desc a:hover {
    color: #ffffff;
}

/* Form grid spacing */
.contact-form .row > [class*="col-"] {
    margin-bottom: 18px;
}

/* =========================================================
   Inputs / Textarea
   ========================================================= */

.contact-form .form-control {
    width: 100%;
    min-height: 60px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.5;
    padding: 16px 20px;
    box-shadow: none;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-form textarea.form-control {
    min-height: 210px;
    resize: vertical;
}

.contact-form .form-control::placeholder {
    color: #7b8491;
    opacity: 1;
}

.contact-form .form-control:focus {
    border-color: #DA8A45;
    box-shadow: 0 0 0 3px rgba(218, 138, 69, .16);
}

/* Invalid states */
.contact-form .form-control.error,
.contact-form .form-control.is-invalid {
    border-color: #dc3545;
}

/* =========================================================
   Symfony / jQuery validation errors
   ========================================================= */

.contact-form label.error,
.contact-form .form-error-message,
.contact-form .invalid-feedback,
.contact-form ul {
    display: block;
    width: 100%;
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    margin: 7px 0 0;
    padding-left: 0;
    list-style: none;
}

.contact-form ul li {
    margin: 0;
}

/* =========================================================
   Privacy checkbox
   ========================================================= */

.contact-form .contact-privacy-check {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 4px 0 22px;
    padding: 0;
    position: relative;
}

/* Reset Bootstrap / theme form-check behavior */
.contact-form .contact-privacy-check.form-check {
    padding-left: 0;
}

.contact-form .contact-privacy-check .form-check-input {
    position: static;
    float: none;

    width: 20px;
    height: 20px;
    min-width: 20px;
    max-width: 20px;

    margin: 3px 0 0;
    padding: 0;

    flex: 0 0 20px;

    border-radius: 5px;
    border: 1px solid #d7dce3;
    background-color: #f1f3f5;
    box-shadow: none;
    cursor: pointer;
}

.contact-form .contact-privacy-check .form-check-input:checked {
    background-color: #DA8A45;
    border-color: #DA8A45;
}

.contact-form .contact-privacy-check .form-check-input:focus {
    border-color: #DA8A45;
    box-shadow: 0 0 0 3px rgba(218, 138, 69, .18);
}

.contact-form .contact-privacy-check .form-check-input.error,
.contact-form .contact-privacy-check .form-check-input.is-invalid {
    border-color: #dc3545;
}

.contact-form .contact-privacy-check .form-check-label {
    display: block;
    flex: 1 1 auto;

    width: auto;
    min-width: 0;
    max-width: none;

    margin: 0;
    padding: 0;

    color: #5f6b7a;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;

    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;

    cursor: pointer;
}

/* Symfony error after checkbox wrapper */
.contact-form .contact-privacy-check + ul,
.contact-form .contact-privacy-check + .invalid-feedback,
.contact-form .contact-privacy-check + .form-error-message {
    margin: -14px 0 18px 34px;
}

/* jQuery Validate error after checkbox wrapper */
.contact-form .contact-privacy-check + label.error {
    margin: -14px 0 18px 34px;
}

/* jQuery Validate may inject label.error inside wrapper */
.contact-form .contact-privacy-check label.error {
    flex: 0 0 100%;
    margin: 6px 0 0 34px;
}

/* =========================================================
   Alerts
   ========================================================= */

.contact-form .contact-alert {
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    margin-top: 18px;
}

.contact-form .alert-success {
    background-color: rgba(34, 197, 94, .12);
    color: #166534;
}

.contact-form .alert-danger {
    background-color: rgba(220, 53, 69, .12);
    color: #991b1b;
}

/* =========================================================
   Button / Loader
   ========================================================= */

.contact-form .pbmit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
}

.contact-form .pbmit-btn:disabled {
    opacity: .75;
    cursor: not-allowed;
}

.contact-form .form-btn-loader {
    width: 42px;
    height: 22px;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.contact-form .form-btn-loader.d-none {
    display: none !important;
}

.contact-form .form-btn-loader:not(.d-none) {
    display: inline-flex;
}

.contact-form .form-btn-loader svg {
    width: 42px;
    height: 22px;
    display: block;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 767px) {
    .contact-form .row > [class*="col-"] {
        margin-bottom: 15px;
    }

    .contact-form .form-control {
        min-height: 56px;
        padding: 14px 16px;
    }

    .contact-form textarea.form-control {
        min-height: 180px;
    }

    .contact-form .contact-privacy-check {
        gap: 12px;
        margin-bottom: 20px;
    }

    .contact-form .contact-privacy-check .form-check-label {
        font-size: 14px;
        line-height: 1.5;
    }

    .contact-form .contact-privacy-check + ul,
    .contact-form .contact-privacy-check + label.error,
    .contact-form .contact-privacy-check + .invalid-feedback,
    .contact-form .contact-privacy-check + .form-error-message,
    .contact-form .contact-privacy-check label.error {
        margin-left: 32px;
    }
}

/* =========================================================
   AJAX feedback
   ========================================================= */

.contact-form-feedback {
    width: 100%;
    margin: 0 0 26px;
    padding: 18px 22px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    animation: contactFeedbackIn .25s ease-out;
}

.contact-form-feedback.d-none {
    display: none !important;
}

.contact-form-feedback-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, .16), rgba(34, 197, 94, .08));
    color: #14532d;
    border: 1px solid rgba(34, 197, 94, .24);
}

.contact-form-feedback-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, .14), rgba(220, 53, 69, .07));
    color: #991b1b;
    border: 1px solid rgba(220, 53, 69, .22);
}

.contact-field-error {
    display: block;
    width: 100%;
    margin-top: 7px;
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.contact-form .form-control.is-invalid,
.contact-form .form-check-input.is-invalid {
    border-color: #dc3545;
}

@keyframes contactFeedbackIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Premium Toast Notification
   ========================================================= */

.contact-toast-container {
    position: fixed;
    top: 26px;
    right: 26px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.contact-toast {
    display: grid;
    grid-template-columns: 42px 1fr 28px;
    gap: 14px;
    align-items: flex-start;

    width: 100%;
    padding: 18px 18px;
    border-radius: 18px;

    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);

    opacity: 0;
    transform: translateX(24px) translateY(-8px) scale(.98);
    transition: opacity .25s ease, transform .25s ease;

    pointer-events: auto;
    overflow: hidden;
    position: relative;
}

.contact-toast::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
}

.contact-toast.is-visible {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
}

.contact-toast.is-hiding {
    opacity: 0;
    transform: translateX(24px) translateY(-8px) scale(.98);
}

.contact-toast-success::before {
    background: #22c55e;
}

.contact-toast-error::before {
    background: #dc3545;
}

.contact-toast-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.contact-toast-success .contact-toast-icon {
    background: rgba(34, 197, 94, .14);
    color: #15803d;
}

.contact-toast-error .contact-toast-icon {
    background: rgba(220, 53, 69, .13);
    color: #b91c1c;
}

.contact-toast-title {
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 4px;
}

.contact-toast-message {
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}

.contact-toast-close {
    width: 28px;
    height: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    color: #475569;

    font-size: 20px;
    line-height: 1;
    cursor: pointer;

    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.contact-toast-close:hover {
    background: rgba(15, 23, 42, .12);
    color: #111827;
    transform: rotate(90deg);
}

@media (max-width: 767px) {
    .contact-toast-container {
        top: 18px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    .contact-toast {
        grid-template-columns: 38px 1fr 26px;
        gap: 12px;
        padding: 16px 16px;
        border-radius: 16px;
    }

    .contact-toast-icon {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .contact-toast-title {
        font-size: 14px;
    }

    .contact-toast-message {
        font-size: 13px;
    }
}

/* =========================================================
   Inline feedback close button
   ========================================================= */

.contact-form-feedback {
    position: relative;
}

.contact-form-feedback-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
}

.contact-form-feedback-content span {
    display: block;
    flex: 1 1 auto;
}

.contact-form-feedback-close {
    width: 28px;
    height: 28px;
    min-width: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .08);
    color: #334155;

    font-size: 22px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.contact-form-feedback-close:hover {
    background: rgba(15, 23, 42, .14);
    color: #111827;
    transform: rotate(90deg);
}

.contact-form-feedback-success .contact-form-feedback-close {
    background: rgba(20, 83, 45, .10);
    color: #14532d;
}

.contact-form-feedback-success .contact-form-feedback-close:hover {
    background: rgba(20, 83, 45, .18);
}

.contact-form-feedback-error .contact-form-feedback-close {
    background: rgba(153, 27, 27, .10);
    color: #991b1b;
}

.contact-form-feedback-error .contact-form-feedback-close:hover {
    background: rgba(153, 27, 27, .18);
}

@media (max-width: 767px) {
    .contact-form-feedback-content {
        gap: 12px;
    }

    .contact-form-feedback-close {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: 20px;
    }
}

/* =========================================================
   Message character counter
   ========================================================= */

.contact-message-field {
    position: relative;
}

.contact-message-counter-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.contact-message-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 92px;
    padding: 5px 10px;
    border-radius: 999px;

    background: rgba(15, 23, 42, .06);
    color: #64748b;

    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.contact-message-counter.is-warning {
    background: rgba(218, 138, 69, .14);
    color: #9a4f17;
}

.contact-message-counter.is-danger {
    background: rgba(220, 53, 69, .13);
    color: #991b1b;
}
