/* Fusion WooDoo — My Account / Frontend Styles */

/* ── Portal wrapper ─────────────────────────────────────────── */
.fusion-woodoo-portal {
    font-size: 0.95rem;
}

.fusion-woodoo-portal h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.fusion-woodoo-portal h3 {
    font-size: 1.1rem;
    margin: 24px 0 12px;
}

/* ── Tables ─────────────────────────────────────────────────── */
.fusion-woodoo-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.fusion-woodoo-table th,
.fusion-woodoo-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.fusion-woodoo-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}

.fusion-woodoo-table tbody tr:hover {
    background: #fafafa;
}

/* ── Status badges ──────────────────────────────────────────── */
.fusion-woodoo-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #e9ecef;
    color: #495057;
}

.fusion-woodoo-badge--sale,
.fusion-woodoo-badge--done,
.fusion-woodoo-badge--posted,
.fusion-woodoo-badge--paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.fusion-woodoo-badge--draft,
.fusion-woodoo-badge--pending {
    background: #fff8e1;
    color: #f57f17;
}

.fusion-woodoo-badge--cancel {
    background: #fce4ec;
    color: #c62828;
}

.fusion-woodoo-badge--processing {
    background: #e3f2fd;
    color: #1565c0;
}

/* ── Utility ────────────────────────────────────────────────── */
.fusion-woodoo-empty {
    color: #888;
    font-style: italic;
    padding: 16px 0;
}

.fusion-woodoo-muted {
    color: #aaa;
}

.fusion-woodoo-notice {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.fusion-woodoo-notice--success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #43a047;
}

.fusion-woodoo-notice--error {
    background: #fce4ec;
    color: #c62828;
    border-left: 4px solid #e53935;
}

.fusion-woodoo-notice--warning {
    background: #fff8e1;
    color: #f57f17;
    border-left: 4px solid #ffb300;
}

/* ── PDF button ─────────────────────────────────────────────── */
.fusion-woodoo-btn-pdf {
    font-size: 0.82rem !important;
    padding: 4px 10px !important;
}

/* ── Forms ──────────────────────────────────────────────────── */
.fusion-woodoo-form {
    max-width: 580px;
}

.fusion-woodoo-form-row {
    margin-bottom: 18px;
}

.fusion-woodoo-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.fusion-woodoo-form-row select,
.fusion-woodoo-form-row textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
}

.fusion-woodoo-form-row textarea {
    resize: vertical;
}

/* Item checkboxes in return form */
.fw-return-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.fw-return-item:last-child {
    border-bottom: none;
}

.fw-return-item input[type="checkbox"] {
    flex-shrink: 0;
}

.fw-return-item-qty {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* ── Order Timeline ─────────────────────────────────────────── */
.fusion-woodoo-timeline-wrap {
    margin: 28px 0 12px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
}

.fusion-woodoo-timeline-wrap h3 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #333;
}

.fusion-woodoo-timeline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.fusion-woodoo-timeline__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.fusion-woodoo-timeline__dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}

.fusion-woodoo-timeline__step--done .fusion-woodoo-timeline__dot {
    background: #43a047;
    border-color: #43a047;
    color: #fff;
}

.fusion-woodoo-timeline__step--done .fusion-woodoo-timeline__dot svg {
    width: 14px;
    height: 14px;
}

.fusion-woodoo-timeline__step--active .fusion-woodoo-timeline__dot {
    background: #1976d2;
    border-color: #1976d2;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.15);
}

.fusion-woodoo-timeline__step--pending .fusion-woodoo-timeline__dot {
    background: #f5f5f5;
    border-color: #ddd;
}

.fusion-woodoo-timeline__label {
    margin-top: 8px;
    font-size: 0.78rem;
    text-align: center;
    color: #555;
    max-width: 80px;
}

.fusion-woodoo-timeline__step--active .fusion-woodoo-timeline__label {
    color: #1976d2;
    font-weight: 600;
}

.fusion-woodoo-timeline__step--done .fusion-woodoo-timeline__label {
    color: #2e7d32;
}

.fusion-woodoo-timeline__tracking {
    display: block;
    font-size: 0.75rem;
    color: #777;
    margin-top: 4px;
    max-width: 100px;
    word-break: break-all;
}

.fusion-woodoo-timeline__connector {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin-bottom: 28px;
    min-width: 20px;
}

.fusion-woodoo-timeline__connector--done {
    background: #43a047;
}

/* ── Communication / Messages ───────────────────────────────── */
.fusion-woodoo-communication {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.fusion-woodoo-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fusion-woodoo-message {
    border: 1px solid #ebebeb;
    border-radius: 6px;
    padding: 12px 16px;
    background: #fafafa;
}

.fusion-woodoo-message--email {
    border-left: 4px solid #1976d2;
}

.fusion-woodoo-message--note {
    border-left: 4px solid #f9a825;
    background: #fffde7;
}

.fusion-woodoo-message__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: #666;
}

.fusion-woodoo-message__author {
    font-weight: 600;
    color: #333;
}

.fusion-woodoo-message__type-badge {
    padding: 1px 7px;
    border-radius: 10px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.75rem;
    font-weight: 500;
}

.fusion-woodoo-message__type-badge--note {
    background: #fff8e1;
    color: #f57f17;
}

.fusion-woodoo-message__body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .fusion-woodoo-table th,
    .fusion-woodoo-table td {
        padding: 8px 8px;
        font-size: 0.85rem;
    }

    .fusion-woodoo-timeline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .fusion-woodoo-timeline__step {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        min-width: unset;
    }

    .fusion-woodoo-timeline__connector {
        width: 2px;
        height: 24px;
        flex: none;
        margin: 0 13px 0;
        min-width: unset;
    }

    .fusion-woodoo-timeline__label {
        text-align: left;
        max-width: unset;
        margin-top: 4px;
    }
}
