/* ─── FC Name Your Price ─────────────────────────────────────────────────── */

.fc-nyp {
    margin-top: 14px;
    padding: 14px 16px 16px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    box-sizing: border-box;
}

/* Title / description */
.fc-nyp__title {
    margin: 0 0 3px;
    font-size: .9rem;
    font-weight: 700;
    color: #1a202c;
}
.fc-nyp__desc {
    margin: 0 0 10px;
    font-size: .8rem;
    color: #718096;
}

/* ── Amount input row ── */
.fc-nyp__input-row {
    display: flex;
    align-items: center;
    border: 2px solid #cbd5e0;
    border-radius: 7px;
    overflow: hidden;
    margin-bottom: 10px;
    transition: border-color .15s;
}
.fc-nyp__input-row:focus-within { border-color: #2d3748; }

.fc-nyp__sym {
    padding: 0 10px 0 12px;
    font-size: .9rem;
    font-weight: 600;
    color: #718096;
    background: #f7fafc;
    border-right: 1px solid #e2e8f0;
    line-height: 42px;
    user-select: none;
}

.fc-nyp__input {
    flex: 1;
    height: 42px;
    border: none;
    outline: none;
    padding: 0 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a202c;
    background: transparent;
    -moz-appearance: textfield;
}
.fc-nyp__input::-webkit-outer-spin-button,
.fc-nyp__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Preset buttons ── */
.fc-nyp__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.fc-nyp__preset {
    padding: 6px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    background: #f7fafc;
    color: #2d3748;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.fc-nyp__preset:hover   { border-color: #2d3748; background: #edf2f7; }
.fc-nyp__preset.is-active {
    background: #2d3748;
    border-color: #2d3748;
    color: #fff;
}

/* ── Add to cart button ── */
.fc-nyp__add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 11px 18px;
    border: none;
    border-radius: 7px;
    background: #2d3748;
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}
.fc-nyp__add-btn:hover   { background: #1a202c; }
.fc-nyp__add-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Spinner hidden by default */
.fc-nyp__spinner { display: none; font-size: 1rem; }
.fc-nyp--loading .fc-nyp__spinner { display: inline; animation: fc-nyp-spin .7s linear infinite; }
.fc-nyp--loading .fc-nyp__add-label { opacity: .6; }

@keyframes fc-nyp-spin {
    from { display: inline-block; transform: rotate(0deg); }
    to   { display: inline-block; transform: rotate(360deg); }
}

/* ── Error message ── */
.fc-nyp__error {
    margin-top: 8px;
    padding: 7px 11px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    border-radius: 6px;
    font-size: .82rem;
}
.fc-nyp__error[hidden] { display: none; }

/* ── Card scope: compact ── */
.fc-nyp[data-scope="card"] {
    padding: 10px 12px 12px;
    margin-top: 8px;
}
.fc-nyp[data-scope="card"] .fc-nyp__input { font-size: 1.1rem; height: 38px; }
.fc-nyp[data-scope="card"] .fc-nyp__sym   { font-size: .82rem; line-height: 38px; }
.fc-nyp[data-scope="card"] .fc-nyp__preset { font-size: .75rem; padding: 5px 9px; }

/* Hide original FluentCart buttons when NYP is present on the same card/page */
.fc-nyp ~ .fluent-cart-add-to-cart-button,
.fc-nyp ~ .fct-product-view-button,
.fc-nyp ~ .fct-single-product-card-view-button,
.fc-nyp ~ .fluent-cart-direct-checkout-button {
    display: none !important;
}
