/* ==========================================================
   Product Pages - shared Let's Talk inquiry form (popup + footer)
   Loaded on every /products/* page
   ========================================================== */

/* ---------- Let's Talk popup + footer form ----------
   Uses the global .lets-talk-modal sizing/breakpoints (main.css + responsive.css);
   only the HMS-specific header and fields are styled here.
   .hms-talk-modal = popup only, .hms-talk-form = popup and footer form. */
.hms-talk-modal .modal-content {
    border: 0;
    border-radius: 10px;
}

.hms-talk-modal .evolution-form-content {
    border-radius: 10px;
}

.hms-talk-modal .business-evolution-form .hms-talk-close {
    top: 25px;
    right: 25px;
    opacity: 1;
}

.hms-talk-caption {
    display: block;
    color: #ffa800;
    font-size: 15px;
    margin-bottom: 4px;
    padding-right: 30px;
}

.hms-talk-title {
    font-family: "DM Sans", sans-serif !important;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 6px;
}

.hms-talk-subtitle {
    font-size: 14px;
    color: #6b6b6b;
    margin-bottom: 0;
}

/* Role + country dropdowns */
.hms-dropdown {
    position: relative;
}

.hms-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0 0 10px;
    border: 0;
    background: none;
    font-size: 14px;
    color: #000;
    text-align: left;
}

.hms-role-select .hms-dropdown-trigger {
    border-bottom: 1px solid #c5c5c5;
}

.hms-dropdown-trigger:focus-visible {
    outline: 0;
    border-bottom-color: #ffa800;
}

.hms-dropdown-trigger:disabled {
    cursor: not-allowed;
}

.hms-dropdown-trigger:disabled svg {
    opacity: 0.5;
}

.hms-dropdown-trigger .is-placeholder {
    color: #565656b2;
}

.hms-dropdown-trigger svg {
    flex-shrink: 0;
    color: #ffa800;
    transition: transform 0.2s;
}

.hms-dropdown-trigger.is-open svg {
    transform: rotate(180deg);
}

.hms-country-select .hms-dropdown-trigger {
    width: auto;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
}

.hms-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    max-height: 224px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.hms-country-select .hms-dropdown-menu {
    right: auto;
    width: 300px;
    max-width: calc(100vw - 64px);
}

.hms-dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    border: 0;
    background: none;
    font-size: 14px;
    color: #212529;
    text-align: left;
    transition: background-color 0.12s;
}

.hms-dropdown-menu button:hover,
.hms-dropdown-menu button:focus-visible {
    outline: 0;
    background-color: #f8f9fa;
}

.hms-dropdown-menu .is-selected button {
    background-color: rgba(255, 168, 0, 0.1);
    color: #ffa800;
}

.hms-dropdown-flag {
    font-size: 18px;
    line-height: 1;
}

.hms-dropdown-check {
    margin-left: auto;
    font-size: 12px;
}

/* Phone: country picker | dial code | number */
.hms-phone-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #c5c5c5;
    padding-bottom: 10px;
}

.hms-phone-code {
    font-size: 14px;
    color: #000;
    padding-left: 10px;
    margin-left: 10px;
    border-left: 1px solid #c5c5c5;
}

.hms-talk-form .contact-form-box .form-group .hms-phone-row .form-control {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0 0 0 8px;
}

.hms-talk-form .contact-form-box .hms-talk-textarea {
    resize: vertical;
    min-height: 34px;
}

/* Validation states (mirrors the Contact Us form) */
.hms-talk-form .contact-form-box .form-group .form-control.hms-field-invalid,
.hms-role-select.hms-field-invalid .hms-dropdown-trigger,
.hms-phone-row.hms-field-invalid {
    border-bottom-color: #dc3545;
}

.hms-field-error {
    margin-top: 4px;
    font-size: 13px;
}

.hms-retry-btn {
    padding: 0;
    border: 0;
    background: none;
    color: #ffa800;
    font-weight: 600;
    text-decoration: underline;
}

.hms-textarea-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: 4px;
}

.hms-textarea-meta .hms-field-error {
    margin-top: 0;
}

.hms-char-count {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
}

.hms-char-count.is-short {
    color: #dc3545;
}

.hms-talk-submit {
    min-width: 144px;
    margin-top: 22px;
    padding: 11px 28px;
    background: #fbb02d;
    border: 1px solid #fbb02d;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    color: #000;
    transition: all 0.3s;
}

.hms-talk-submit:hover {
    background: transparent;
}

.hms-talk-submit:disabled {
    background: #fbb02d;
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 991px) {
    .hms-talk-title {
        font-size: 22px;
    }
}

@media (max-width: 575px) {
    /* Let the global orange round close button take over on phones */
    .hms-talk-modal .business-evolution-form .hms-talk-close {
        top: -8px;
        right: -4px;
    }

    .hms-talk-caption {
        font-size: 13px;
    }

    .hms-talk-title {
        font-size: 19px;
    }

    .hms-talk-subtitle {
        font-size: 13px;
    }

    .hms-talk-submit {
        width: 100%;
    }
}
