/* FastReturn – Odstąpienie od umowy */

/* ===== PRZYCISK ===== */
.fastreturn-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
}

.fastreturn-wrapper--align-left {
    justify-content: flex-start;
}

.fastreturn-wrapper--align-center {
    justify-content: center;
}

.fastreturn-wrapper--align-right {
    justify-content: flex-end;
}

.fastreturn-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--fr-btn-color, #FF6600);
    color: var(--fr-btn-text-color, #fff);
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    line-height: 1;
}

.fastreturn-trigger-btn:hover,
.fastreturn-trigger-btn:focus {
    opacity: 0.88;
    color: var(--fr-btn-text-color, #fff);
    outline: none;
    text-decoration: none;
    transform: translateY(-1px);
}

.fastreturn-trigger-btn:active {
    transform: translateY(0);
}

.fastreturn-trigger-btn svg {
    flex-shrink: 0;
}

/* Przycisk na stronie zamówienia */
.fastreturn-order-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.fr-order-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.fr-days-left-info {
    margin: 0;
    font-size: 0.9rem;
    color: #495057;
}

.fr-expired-notice {
    padding: 10px 15px;
    background: #f8f9fa;
    border-left: 3px solid #6c757d;
    color: #6c757d;
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
}

/* ===== MODAL ===== */

/* Modal header layout */
#fastReturnFooterModal .modal-header,
#fastReturnOrderModal  .modal-header,
#fastReturnHistoryModal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Close button – BS4 uses .close, style it consistently */
.fr-modal-close {
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    color: #6c757d;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.fr-modal-close:hover,
.fr-modal-close:focus {
    opacity: 1;
    background: rgba(0, 0, 0, 0.07);
    color: #212529;
    outline: none;
}

#fastReturnFooterModal .modal-dialog,
#fastReturnOrderModal .modal-dialog,
#fastReturnHistoryModal .modal-dialog {
    max-width: 580px;
    width: 100%;
}

#fastReturnFooterModal .modal-title,
#fastReturnOrderModal .modal-title,
#fastReturnHistoryModal .modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ===== STEP INDICATOR ===== */
.fr-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.fr-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.fr-step-active {
    background: var(--fr-btn-color, #FF6600);
    color: var(--fr-btn-text-color, #fff);
}

.fr-step-done {
    background: #28a745;
    color: #fff;
}

.fr-step-line {
    flex: 1;
    height: 2px;
    background: #dee2e6;
    max-width: 60px;
    margin: 0 4px;
}

.fr-step-line-done {
    background: #28a745;
}

.fr-step-label {
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* ===== EXCLUDED PRODUCTS ===== */

.fr-product-item--excluded {
    background: #f8f9fa;
}

.fr-product-label--excluded {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: normal;
    opacity: 0.55;
    cursor: not-allowed;
}

.fr-product-check-placeholder {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #ced4da;
    border-radius: 3px;
    background: #e9ecef;
    display: inline-block;
}

.fr-excluded-badge {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 3px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== PRODUCT LIST ===== */
.fr-product-list {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.fr-product-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.fr-product-item:last-child {
    border-bottom: none;
}

.fr-product-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.fr-product-check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.fr-product-name {
    flex: 1;
    font-weight: 500;
}

.fr-product-qty {
    color: #6c757d;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* ===== CONFIRM SUMMARY ===== */
.fr-confirm-summary {
    font-size: 0.9rem;
    line-height: 1.6;
}

.fr-confirm-summary ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

/* ===== LEGAL NOTICE ===== */
.fr-legal-notice {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ===== ALERT ===== */
.fr-alert {
    font-size: 0.9rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* ===== FORM FIELDS – isolated classes, no theme interference ===== */

.fr-field {
    position: static;
    margin-bottom: 1rem;
}

.fr-field--mt {
    margin-top: 1rem;
}

.fr-field label {
    position: static;
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.35rem;
    padding: 0;
    transform: none;
    pointer-events: auto;
    background: transparent;
    line-height: 1.4;
    text-align: left;
    float: none;
    width: auto;
}

.fr-input {
    position: static;
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: auto;
    transform: none;
    box-sizing: border-box;
}

.fr-input:focus {
    border-color: var(--fr-btn-color, #FF6600);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
    outline: none;
}

/* ===== PHASE FOOTER (buttons) ===== */
.fr-phase-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* ===== PRIMARY BUTTON (uses CSS variable) ===== */
.fr-btn-primary {
    background-color: var(--fr-btn-color, #FF6600);
    border-color: var(--fr-btn-color, #FF6600);
    color: var(--fr-btn-text-color, #fff);
    font-weight: 600;
}

.fr-btn-primary:hover,
.fr-btn-primary:focus {
    background-color: var(--fr-btn-color, #FF6600);
    border-color: var(--fr-btn-color, #FF6600);
    color: var(--fr-btn-text-color, #fff);
    opacity: 0.88;
}

.fr-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ===== SUCCESS ===== */
.fr-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #28a745;
    color: #fff;
    font-size: 2rem;
    margin: 0 auto;
}

/* ===== ORDER HISTORY LIST ===== */
.fr-history-btn {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 4px 10px;
    margin-top: 4px;
}

.fr-history-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 3px;
    margin-top: 4px;
    line-height: 1.4;
}

.fr-badge-submitted {
    background: #e8f4e8;
    color: #28a745;
    border: 1px solid #c3e6cb;
}

.fr-badge-expired {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* ===== ADMIN FILTER FORM ===== */
.fr-filter-form .form-group {
    margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 575px) {
    .fr-phase-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    .fr-phase-footer .btn {
        width: 100%;
    }
    .fr-order-action {
        flex-direction: column;
        align-items: flex-start;
    }
}
