/* ===== GLOBAL RESET I NADRZĘDNY KONTENER SYSTEMU ===== */
body {
    font-family: Montserrat, sans-serif;
}

/* GŁÓWNY WRAPPER STRONY - POSIADA TERAZ SZEROKOŚĆ MAX 1300PX */
.odbierz-konto-page {
    width: 100% !important;
    max-width: 1300px !important;
    margin: 30px auto !important;
    padding: 0 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* Środkuje elementy wewnątrz (zamówienia i nagłówek) */
    box-sizing: border-box !important;
    clear: both !important;
    float: none !important;
}

/* Wymuszenie wyśrodkowania rodziców motywu WordPress */
body.page-template-page-odbierz-konto #content,
body.page-template-page-odbierz-konto .site-content,
body.page-template-page-odbierz-konto main {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

/* ===== NAGŁÓWEK "ODBIERZ KONTO" (ROZSZERZONY DO 1300PX) ===== */
.page-redeem-header {
    width: 100% !important;
    max-width: 1300px !important;
    margin: 0 auto 28px auto !important;
    padding: 28px 32px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(22, 27, 31, 0.94) 0%, rgba(15, 20, 25, 0.98) 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box !important;
}

.page-redeem-header::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto -1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 221, 68, 0) 0%, rgba(255, 221, 68, 0.9) 50%, rgba(255, 221, 68, 0) 100%);
    opacity: 0.9;
}

.page-redeem-title {
    margin: 0 0 8px 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    text-align: center;
}

.page-redeem-subtitle {
    margin: 0 auto;
    max-width: 720px;
    font-size: 14px;
    line-height: 1.6;
    color: #98a3b3;
    text-align: center;
}

/* ===== PASKI ZAMÓWIEŃ (ZWĘŻONE I WYŚRODKOWANE) ===== */
.order-wrapper {
    width: 100% !important;
    max-width: 760px !important; /* Kompaktowa, estetyczna szerokość dla samych nakładek zamówień */
    margin: 0 auto 16px auto !important;
    box-sizing: border-box !important;
    display: block !important;
    clear: both !important;
}

.order-number-wrapper {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 14px;
    position: relative;
    z-index: 0;
}

@property --angle {
    syntax: "<angle>";
    initial-value: 270deg;
    inherits: false;
}

@keyframes rotate {
    0% { --angle: 0deg; }
    100% { --angle: 360deg; }
}

.order-number-wrapper.active-order::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: 14px;
    background: linear-gradient(var(--angle), #161b1f, #ffdd44, #161b1f);
    animation: rotate 12s linear infinite;
    z-index: 0;
}

.order-number-wrapper.active-order::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    background: linear-gradient(var(--angle), #161b1f, #ffdd44, #161b1f);
    animation: rotate 12s linear infinite;
    filter: blur(4px);
    opacity: 0.7;
    z-index: 0;
}

.order-number-wrapper.animation-paused::before,
.order-number-wrapper.animation-paused::after {
    animation-play-state: paused;
}

.order-number-wrapper.active-order .order-number {
    border-color: transparent;
}

.order-number {
    font-size: 18px;
    width: 100%;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #161b1f;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 18px 24px;
    color: #fff;
    transition: border-color 0.3s ease, background 0.2s ease;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.order-number:hover {
    background: #1a2025;
}

.order-arrow {
    width: 14px;
    height: 14px;
    display: inline-block;
    fill: #ffdd44;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.order-arrow-open {
    transform: rotate(180deg);
}

/* ZAWARTOŚĆ ZAMÓWIENIA (PO ROZWINIĘCIU) */
.order-box {
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px;
    width: 100% !important;
    margin: 16px 0 24px 0 !important;
    box-sizing: border-box !important;
}

.order-box.is-open {
    opacity: 1;
}

.order-box.allow-overflow {
    overflow: visible;
}

/* ===== KARTA PRODUKTU ===== */
.acc-redeem-box {
    background: linear-gradient(180deg, rgba(22, 27, 31, 0.98) 0%, rgba(17, 21, 26, 1) 100%);
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 20px;
    width: 100% !important;
    max-width: 500px !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: transform 0.18s ease, border-color 0.18s ease;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.acc-redeem-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 14px;
}

.acc-redeem-header-text {
    flex: 1;
}

.acc-redeem-header-title {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    line-height: 1.4;
    display: block;
}

.acc-redeem-product-img {
    width: 52px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.acc-redeem-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.acc-redeem-product-redeem-button {
    width: 100%;
    text-align: center;
    background: #ffdd44;
    color: #000;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 0;
    border-radius: 8px;
    cursor: pointer;
    margin: 0;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
}

.acc-redeem-product-redeem-button:hover {
    opacity: 0.85;
}

.insctruction-anchor {
    font-size: 13px;
    color: #ffdd44;
    text-decoration: none;
    text-align: center;
    margin-top: 4px;
}

.insctruction-anchor:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== STAŃ BRAKU DANYCH / ZALOGOWANIA ===== */
.notlogin {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 40vh;
    padding: 20px !important;
}

.notlogin p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ===== POPUP DANYCH KONTA ===== */
.account-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.account-popup.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.account-popup-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

.account-popup-box {
    position: relative;
    z-index: 2;
    background: #1e2328;
    border: 1px solid #3a3f45;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 221, 68, 0.08);
    border-radius: 14px;
    padding: 24px;
    width: min(680px, calc(100% - 24px));
    max-height: 85vh;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.account-popup.is-visible .account-popup-box {
    transform: scale(1);
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.popup-lock-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: #ffdd44;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-header-text {
    display: flex;
    flex-direction: column;
}

.popup-header-title {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
}

.popup-header-subtitle {
    font-size: 12px;
    color: #808080;
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 16px;
    height: 16px;
    fill: #808080;
    cursor: pointer;
    transition: fill 0.2s;
}

.popup-close:hover {
    fill: #ffdd44;
}

.popup-body {
    overflow-y: auto;
    padding-right: 10px;
    margin-right: -10px;
}

.popup-body::-webkit-scrollbar {
    width: 4px;
}

.popup-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb {
    background: rgba(255, 221, 68, 0.4);
    border-radius: 10px;
}

.popup-account-row {
    background: #0f0f0f;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 10px;
}

.popup-account-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.popup-field-label {
    font-size: 13px;
    color: #888;
}

.popup-field-value {
    font-size: 14px;
    font-family: monospace;
    color: #ffdd44;
    background: none;
}

.popup-field-value-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 221, 68, 0.08);
    border: 1px solid rgba(255, 221, 68, 0.15);
    color: #ffdd44;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s ease, transform 0.15s ease;
}

.copy-btn:hover {
    background: rgba(255, 221, 68, 0.18);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: rgba(100, 200, 100, 0.15);
    border-color: rgba(100, 200, 100, 0.3);
    color: #6dc86d;
}

.popup-account-divider {
    border-top: 1px solid #2a2a2a;
    margin: 6px 0;
}

.popup-platform-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 8px;
}

.popup-platform-label-text {
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #ffdd44;
    white-space: nowrap;
    opacity: 0.8;
}

.popup-platform-label-line {
    flex: 1;
    height: 1px;
    background: #2a2a2a;
    display: block;
}

.popup-contact-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 14px;
    background: #0f0f0f;
    border-radius: 8px;
    border-left: 3px solid #ffdd44;
    font-size: 12px;
    color: #aaa;
    line-height: 1.5;
}

.popup-contact-note-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.popup-contact-note a {
    color: #ffdd44;
    text-decoration: none;
}

.popup-contact-note a:hover {
    text-decoration: underline;
}

.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.popup-footer-link {
    font-size: 12px;
    text-decoration: none;
}

.popup-footer-link--primary {
    color: #ffdd44;
}

.popup-footer-link--secondary {
    color: #888;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
    .page-redeem-header {
        padding: 20px 16px;
    }

    .order-number {
        padding: 16px;
        font-size: 16px;
    }

    .acc-redeem-box {
        padding: 16px;
    }

    .popup-field-value {
        font-size: 12px;
    }

    .account-popup-box {
        padding: 18px 14px;
    }
}

/* RESET STYLÓW MOTYWU ASTRA DLA PRZYCISKU KOPIOWANIA */
button.copy-btn,
.copy-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 6px !important;
    background: rgba(255, 221, 68, 0.1) !important;
    border: 1px solid rgba(255, 221, 68, 0.2) !important;
    color: #ffdd44 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
}

button.copy-btn:hover,
.copy-btn:hover {
    background: rgba(255, 221, 68, 0.25) !important;
    border-color: rgba(255, 221, 68, 0.4) !important;
}

/* WIDOCZNOŚĆ IKONKI SVG W ASTRZE */
.copy-btn svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    stroke: #ffdd44 !important;
    fill: none !important;
    margin: 0 auto !important;
}

/* KIEDY SKOPIOWANO */
button.copy-btn.copied,
.copy-btn.copied {
    background: rgba(109, 200, 109, 0.15) !important;
    border-color: rgba(109, 200, 109, 0.4) !important;
}

.copy-btn.copied svg {
    stroke: #6dc86d !important;
}