/* =========================
WIDGET
========================= */

.portal-support {
  position: fixed;
  bottom: 24px;
  right: 24px;

  display: flex;
  gap: 12px;

  z-index: 9999;
}


/* =========================
BUTTON BASE
========================= */

.support-btn {
  width: 52px;
  height: 52px;

  border-radius: 50%;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  background: #0E8766;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);

  transition: all 0.2s ease;
}

.support-btn img {
  width: 28px;
  height: 28px;
}


/* =========================
HOVER
========================= */

.support-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}


/* =========================
ACTIVE CLICK
========================= */

.support-btn:active {
  transform: scale(0.95);
}


/* =========================
POPUP OVERLAY
========================= */

.portal-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.34);
}

.portal-popup.is-open {
    display: flex;
}

/* =========================
BOX
========================= */

.portal-popup-box {
    position: relative;
    width: 100%;
    max-width: 600px;
    min-height: 560px;
    padding: 42px 44px 38px;
    background: #043729;
    color: #FFF;
    overflow: hidden;
}

.portal-popup-box--call {
    max-width: 600px;
    min-height: 400px;
}

.portal-popup-box--email {
    max-width: 600px;
    min-height: 780px;
}

/* =========================
CLOSE
========================= */

.portal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.2s ease;
}

.portal-close:hover {
    opacity: 1;
}

.portal-close span {
    position: absolute;
    top: 13px;
    left: 4px;
    width: 20px;
    height: 1px;
    background: #FFF;
}

.portal-close span:first-child {
    transform: rotate(45deg);
}

.portal-close span:last-child {
    transform: rotate(-45deg);
}

/* =========================
HEADER
========================= */

.portal-popup__brand {
    margin-bottom: 44px;
    text-align: center;
}

.portal-popup__brand img {
    width: 100%;
    max-width: 262px;
    height: auto;
    display: inline-block;
}

.portal-popup__header {
    max-width: 430px;
    margin: 0 auto 36px;
    text-align: center;
}

.portal-popup__header h3 {
    margin: 0 0 10px;
    color: #FFF;
    font-size: 2.05rem;
    line-height: 1.12;
    font-weight: 400;
}

.portal-popup__header p {
    margin: 0;
    color: #A9A8A8;
    font-size: 1rem;
    line-height: 1.15;
}

/* =========================
FORM
========================= */

.portal-popup__form {
    max-width: 440px;
    margin: 0 auto;
}

.portal-popup__field {
    margin-bottom: 34px;
}

.portal-popup__field label {
    display: block;
    margin-bottom: 10px;
    color: #A3D5C8;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 400;
}

.portal-popup__field input,
.portal-popup__field textarea,
.portal-popup__field select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 1px solid #A9A8A8;
    border-radius: 0;
    background: transparent;
    color: #FFF;
    font-size: 0.98rem;
    line-height: 1.35;
    box-shadow: none;
    outline: none;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    caret-color: #FFF;
}

.portal-popup__field input:focus,
.portal-popup__field textarea:focus,
.portal-popup__field select:focus {
    border-bottom-color: #FFF;
}

.portal-popup__field input::placeholder,
.portal-popup__field textarea::placeholder {
    color: #FFF;
    opacity: 1;
}

.portal-popup__field textarea {
    min-height: 220px;
    resize: none;
    padding-top: 2px;
}

.portal-popup__field--select select {
    padding-right: 28px;
    cursor: pointer;
    color: #0E8766;
    background-image: url("../images/portal-maisinvest-icon-arrow-down-select-green.svg");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 14px;
}

.portal-popup__field--select select option {
    color: #043729;
}

.portal-popup__field--file input[type="file"] {
    padding-bottom: 10px;
    cursor: pointer;
    color: #FFF;
}

.portal-popup__field--file input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: 0;
    background: transparent;
    color: #FFF;
    cursor: pointer;
    padding: 0;
}

.portal-popup__actions {
    margin-top: 18px;
    text-align: center;
}

.portal-popup__submit {
    border: 0;
    background: transparent;
    padding: 0;
    color: #A3D5C8;
    font-family: "Spectral", serif;
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: underline;
    text-underline-offset: 5px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.portal-popup__submit:hover {
    opacity: 0.8;
}

/* =========================
FILE PREVIEW
========================= */

.support-file-preview {
    margin-top: 14px;
}

.support-file-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 0;
    color: #FFF;
    font-size: 0.9rem;
    line-height: 1.4;
}

.support-file-remove {
    color: #A3D5C8;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.support-file-remove:hover {
    opacity: 0.8;
}

/* =========================
FEEDBACK
========================= */

.support-feedback {
    display: none;
    max-width: 440px;
    margin: 0 auto 22px;
    padding: 12px 14px;
    border: 1px solid transparent;
    font-size: 0.92rem;
    line-height: 1.45;
}

.support-feedback.success {
    display: block;
    border-color: #A3D5C8;
    background: rgba(163, 213, 200, 0.12);
    color: #FFF;
}

.support-feedback.error {
    display: block;
    border-color: #A9A8A8;
    background: rgba(169, 168, 168, 0.12);
    color: #FFF;
}

/* =========================
AUTOFILL
========================= */

.portal-popup__field input:-webkit-autofill,
.portal-popup__field input:-webkit-autofill:hover,
.portal-popup__field input:-webkit-autofill:focus,
.portal-popup__field input:-webkit-autofill:active,
.portal-popup__field textarea:-webkit-autofill,
.portal-popup__field select:-webkit-autofill {
    -webkit-text-fill-color: #FFF;
    caret-color: #FFF;
    -webkit-box-shadow: 0 0 0 1000px #043729 inset;
    box-shadow: 0 0 0 1000px #043729 inset;
    transition: background-color 99999s ease-in-out 0s;
}

.portal-popup__field input:-moz-autofill,
.portal-popup__field textarea:-moz-autofill,
.portal-popup__field select:-moz-autofill {
    box-shadow: 0 0 0 1000px #043729 inset;
    -moz-text-fill-color: #FFF;
    color: #FFF;
}

.portal-popup__field input:autofill,
.portal-popup__field textarea:autofill,
.portal-popup__field select:autofill {
    box-shadow: 0 0 0 1000px #043729 inset;
    -webkit-text-fill-color: #FFF;
    color: #FFF;
}

/* =========================
RESPONSIVE
========================= */

@media (max-width: 640px) {
    .portal-popup {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }

    .portal-popup-box,
    .portal-popup-box--call,
    .portal-popup-box--email {
        max-width: none;
        min-height: 100vh;
        padding: 32px 24px 28px;
    }

    .portal-popup__brand {
        margin-bottom: 34px;
    }

    .portal-popup__brand img {
        max-width: 220px;
    }

    .portal-popup__header {
        margin-bottom: 28px;
    }

    .portal-popup__header h3 {
        font-size: 1.8rem;
    }

    .portal-popup__header p {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .portal-popup__field {
        margin-bottom: 28px;
    }

    .portal-popup__field textarea {
        min-height: 180px;
    }
}