/* ---- Page trigger ---- */
.fme-offer-widget {
    display: inline-block;
}

.fme-offer-widget .fme-make-offer-btn {
    margin-top: 5px;
    background-color: #1d71ab !important;
    color: #fff;
    border-radius: 9999px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.fme-offer-widget .fme-make-offer-btn:hover {
    background-color: #1d71ab;
    box-shadow: 0 2px 10px rgba(29, 113, 171, 0.4);
}

/* Detached from Quick Shop: hide trigger until modal closes */
.fme-offer-widget.fme-offer-widget--qs-bridge {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Modal shell (Magento reparents under .modals-wrapper) ---- */
.modals-wrapper .modal-popup.offer-custom-modal {
    z-index: 10001;
}

.modals-wrapper .modal-popup.offer-custom-modal .modal-inner-wrap {
    width: min(420px, calc(100vw - 28px)) !important;
    max-width: 96vw !important;
    margin: 2rem auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12), 0 0 1px rgba(15, 23, 42, 0.08) !important;
    position: relative;
    overflow: hidden;
}

.modals-wrapper .modal-popup.offer-custom-modal .modal-header {
    display: block !important;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
    min-height: 0;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.modals-wrapper .modal-popup.offer-custom-modal .modal-header > .modal-title {
    display: none !important;
}

.modals-wrapper .modal-popup.offer-custom-modal .modal-header .action-close {
    padding: 14px 16px !important;
    margin: 0 !important;
}

.modals-wrapper .modal-popup.offer-custom-modal .modal-content {
    padding: 28px 24px 26px !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}

.modals-wrapper .modal-popup.offer-custom-modal._inner-scroll .modal-content {
    max-height: min(78vh, 680px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-offer-modal,
.modals-wrapper .modal-popup.offer-custom-modal .offer-modal-wrapper {
    margin: 0;
    padding: 0;
    background: transparent;
}

/* ---- In-modal layout ---- */
.modals-wrapper .modal-popup.offer-custom-modal .offer-message.fme-offer-message {
    display: none;
    padding: 12px 14px;
    margin: 0 0 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-offer-modal__header {
    text-align: center;
    padding: 0 40px 16px;
    margin: 0 -24px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-offer-modal-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    padding: 0;
    color: #111827;
    letter-spacing: -0.02em;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-offer-form .field {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-offer-form .field:last-of-type {
    margin-bottom: 0;
}

.modals-wrapper .modal-popup.offer-custom-modal .field .label {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin: 0;
}

.modals-wrapper .modal-popup.offer-custom-modal .field .label .required {
    color: #dc2626;
    margin-left: 2px;
}

.modals-wrapper .modal-popup.offer-custom-modal .field .control {
    margin: 0;
}

.modals-wrapper .modal-popup.offer-custom-modal .field input.input-text {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modals-wrapper .modal-popup.offer-custom-modal .field input.input-text::placeholder {
    color: #9ca3af;
}

.modals-wrapper .modal-popup.offer-custom-modal .field input.input-text:focus {
    outline: none;
    border-color: #1d71ab;
    box-shadow: 0 0 0 3px rgba(29, 113, 171, 0.2);
}

.modals-wrapper .modal-popup.offer-custom-modal .price-field {
    position: relative;
}

.modals-wrapper .modal-popup.offer-custom-modal .price-field .currency-symbol {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    pointer-events: none;
}

.modals-wrapper .modal-popup.offer-custom-modal .price-field input.input-text {
    padding-left: 48px !important;
}

.modals-wrapper .modal-popup.offer-custom-modal .otp-send-wrapper {
    margin-top: 4px;
    margin-bottom: 6px;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-send-otp-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-send-otp-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-otp-field {
    margin-top: 4px;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-otp-field label {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

.modals-wrapper .modal-popup.offer-custom-modal .fme-otp-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.modals-wrapper .modal-popup.offer-custom-modal .create-account-field {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 22px !important;
    font-size: 14px;
    color: #374151;
}

.modals-wrapper .modal-popup.offer-custom-modal .create-account-field input {
    width: auto;
    margin: 0;
}

.modals-wrapper .modal-popup.offer-custom-modal .btn-submit {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: #1d71ab;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.modals-wrapper .modal-popup.offer-custom-modal .btn-submit:hover {
    background: #165d91;
    box-shadow: 0 4px 14px rgba(29, 113, 171, 0.35);
}
