/* ═══════════════════════════════════════════════════════════════
   NagyonAllat Újrarendelés — Styles
   Colors: primary #181414 · accent #feb447 · success #69B59F
   Font: Rubik · Radius: 16px · Transition: cubic-bezier(.4,0,.2,1)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Spinner animation ────────────────────────────────────────── */
@keyframes nare-spin {
    to { transform: rotate(360deg); }
}

.nare-spinner {
    animation: nare-spin 0.75s linear infinite;
    flex-shrink: 0;
}

/* ─── Orders table: actions column layout ──────────────────────── */
td.woocommerce-orders-table__cell-order-actions {
    white-space: nowrap;
}

td.woocommerce-orders-table__cell-order-actions a.woocommerce-button,
td.woocommerce-orders-table__cell-order-actions a.button {
    display: inline-flex;
    align-items: center;
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    padding: 8px 16px;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
    margin: 2px 6px 2px 0;
    vertical-align: middle;
}

/* "Megtekintés" (view) gomb — körvonalazott, sötét */
td.woocommerce-orders-table__cell-order-actions a.woocommerce-button.view,
td.woocommerce-orders-table__cell-order-actions a.button.view {
    background: transparent !important;
    color: #181414 !important;
    border: 1.5px solid rgba(24, 20, 20, 0.2) !important;
    box-shadow: none !important;
}

td.woocommerce-orders-table__cell-order-actions a.woocommerce-button.view:hover,
td.woocommerce-orders-table__cell-order-actions a.button.view:hover {
    background: rgba(24, 20, 20, 0.05) !important;
    border-color: rgba(24, 20, 20, 0.4) !important;
    transform: translateY(-1px);
    color: #181414 !important;
}

/* "Újra rendelés" gomb — teli, narancs */
a.nare_reorder.woocommerce-button,
a.nare_reorder {
    background: #feb447 !important;
    color: #181414 !important;
    border: 1.5px solid transparent !important;
    box-shadow: 0 2px 8px rgba(254, 180, 71, 0.3) !important;
}

a.nare_reorder:hover {
    background: #f0a830 !important;
    box-shadow: 0 4px 14px rgba(254, 180, 71, 0.45) !important;
    transform: translateY(-1px);
    color: #181414 !important;
}

a.nare_reorder.nare-loading,
a.nare_reorder[disabled] {
    opacity: 0.75;
    pointer-events: none;
    transform: none;
}

a.nare_reorder.nare-done {
    background: #69B59F !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(105, 181, 159, 0.35) !important;
    color: #fff !important;
}

/* ─── Generic reorder button (detail page & dashboard) ─────────── */
.nare-reorder-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #feb447;
    color: #181414;
    border: none;
    border-radius: 100px;
    padding: 12px 24px;
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(254, 180, 71, 0.3);
    text-decoration: none;
}

.nare-reorder-btn:hover {
    background: #f0a830;
    box-shadow: 0 8px 24px rgba(254, 180, 71, 0.45);
    transform: translateY(-2px);
    color: #181414;
}

.nare-reorder-btn:active {
    transform: translateY(0);
}

.nare-reorder-btn.nare-loading,
.nare-reorder-btn:disabled {
    opacity: 0.75;
    pointer-events: none;
    transform: none;
}

.nare-reorder-btn.nare-done {
    background: #69B59F;
    box-shadow: 0 4px 16px rgba(105, 181, 159, 0.35);
    color: #fff;
}

/* ─── Order detail page wrap ───────────────────────────────────── */
.nare-detail-wrap {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(65, 60, 60, 0.08);
}

/* WooCommerce's own "Order again" link — hide it, we replace it */
.order-again {
    display: none !important;
}

/* ─── Dashboard widget ─────────────────────────────────────────── */
.nare-dashboard-widget {
    margin-top: 32px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(65, 60, 60, 0.07);
    overflow: hidden;
    border: 1px solid rgba(65, 60, 60, 0.06);
}

.nare-dashboard-widget__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(65, 60, 60, 0.06);
}

.nare-dashboard-widget__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: rgba(254, 180, 71, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f0a830;
}

.nare-dashboard-widget__meta {
    flex: 1;
    min-width: 0;
}

.nare-dashboard-widget__title {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 700;
    color: #181414;
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.2;
}

.nare-dashboard-widget__sub {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(65, 60, 60, 0.55);
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
}

.nare-status {
    background: rgba(105, 181, 159, 0.15);
    color: #3a9e82;
    border-radius: 100px;
    padding: 1px 8px;
    font-weight: 600;
}

.nare-dashboard-widget__total {
    font-size: 1.05rem;
    font-weight: 700;
    color: #181414;
    white-space: nowrap;
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
}

/* Product thumbnails */
.nare-dashboard-widget__items {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    flex-wrap: wrap;
}

.nare-dashboard-widget__item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(65, 60, 60, 0.03);
    border-radius: 12px;
    padding: 8px 12px 8px 8px;
    min-width: 0;
    max-width: 200px;
}

.nare-dashboard-widget__item-img {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.nare-dashboard-widget__item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nare-dashboard-widget__item-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nare-dashboard-widget__item-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #181414;
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.nare-dashboard-widget__item-qty {
    font-size: 0.72rem;
    color: rgba(65, 60, 60, 0.5);
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
}

.nare-dashboard-widget__overflow {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(65, 60, 60, 0.45);
    padding: 6px 10px;
    white-space: nowrap;
}

/* Footer CTA */
.nare-dashboard-widget__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(254, 180, 71, 0.04);
    border-top: 1px solid rgba(65, 60, 60, 0.06);
    flex-wrap: wrap;
}

.nare-reorder-btn--dashboard {
    flex-shrink: 0;
}

.nare-dashboard-widget__view-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(65, 60, 60, 0.5);
    text-decoration: none;
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
    transition: color 0.2s ease;
}

.nare-dashboard-widget__view-link:hover {
    color: #181414;
}

/* ─── Toast notification ───────────────────────────────────────── */
#nare-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #181414;
    color: #fff;
    border-radius: 18px;
    padding: 16px 18px;
    max-width: 360px;
    min-width: 260px;
    box-shadow: 0 20px 50px rgba(24, 20, 20, 0.25), 0 4px 16px rgba(24, 20, 20, 0.15);
    transform: translateY(calc(100% + 40px));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

#nare-toast.nare-toast--show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nare-toast__icon-wrap {
    flex-shrink: 0;
    margin-top: 1px;
}

.nare-toast__icon--success { color: #69B59F; }
.nare-toast__icon--warning { color: #feb447; }

.nare-toast__body {
    flex: 1;
    min-width: 0;
}

.nare-toast__title {
    margin: 0;
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.nare-toast__skipped {
    margin: 5px 0 0;
    font-family: Rubik, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

.nare-toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    transition: color 0.2s ease;
    margin-top: 1px;
}

.nare-toast__close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ─── Mobile adjustments ───────────────────────────────────────── */
@media (max-width: 576px) {
    #nare-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    .nare-dashboard-widget__header {
        flex-wrap: wrap;
    }

    .nare-dashboard-widget__total {
        margin-left: 58px; /* align under text, past icon */
    }

    .nare-dashboard-widget__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .nare-reorder-btn--dashboard {
        text-align: center;
        justify-content: center;
    }
}
