/* ============================================================
   Submitted Quotes – My Account Frontend Styles
   Plugin: submitted-quotes
   ============================================================ */

/* ── Wrapper ──────────────────────────────────────────────── */
.sq-my-account-wrap {
    width: 100%;
}

.sq-page-title {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* ── Empty State ──────────────────────────────────────────── */
.sq-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    color: #6b7280;
}

.sq-empty-icon {
    font-size: 3rem;
    margin-bottom: .75rem;
    opacity: .6;
}

.sq-empty-state h3 {
    font-size: 1.1em;
    margin: 0 0 .5rem;
    color: #374151;
}

/* ── Table Wrapper ────────────────────────────────────────── */
.sq-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Quotes Table ─────────────────────────────────────────── */
.sq-quotes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9375em;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.sq-quotes-table thead {
    background: #1e3a5f;
    color: #fff;
}

.sq-quotes-table thead th {
    padding: .85rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: .8125em;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
    border: none;
}

.sq-quotes-table tbody tr {
    border-bottom: 1px solid #f1f3f5;
    transition: background .15s ease;
}

.sq-quotes-table tbody tr:last-child {
    border-bottom: none;
}

.sq-quotes-table tbody tr:hover {
    background: #f8faff;
}

.sq-quotes-table td {
    padding: .85rem 1rem;
    vertical-align: middle;
    color: #374151;
}

/* Column widths */
.sq-col-number  { width: 160px; white-space: nowrap; }
.sq-col-date    { width: 150px; white-space: nowrap; }
.sq-col-status  { width: 140px; }
.sq-col-actions { width: auto; }

/* ── Quote Number ─────────────────────────────────────────── */
.sq-quote-num {
    font-family: monospace;
    font-size: 1.05em;
    font-weight: 700;
    color: #1e3a5f;
    letter-spacing: .02em;
}

/* ── Date / Time ──────────────────────────────────────────── */
.sq-date {
    display: block;
    font-weight: 500;
}

.sq-time {
    display: block;
    font-size: .8125em;
    color: #9ca3af;
    margin-top: 2px;
}

/* ── Status Badges ────────────────────────────────────────── */
.sq-badge {
    display: inline-block;
    padding: .25em .75em;
    border-radius: 999px;
    font-size: .78em;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sq-status-pending   { background: #fef9c3; color: #92400e; border: 1px solid #fde68a; }
.sq-status-quoted    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.sq-status-approved  { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.sq-status-rejected  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.sq-status-cancelled { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.sq-status-unknown   { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }

/* ── Action Group ─────────────────────────────────────────── */
.sq-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
}

.sq-inline-form {
    display: inline;
    margin: 0;
    padding: 0;
}

/* ── Buttons ──────────────────────────────────────────────── */
.sq-btn {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    padding: .4em .85em;
    border-radius: 5px;
    font-size: .82em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .15s ease, transform .1s ease;
    line-height: 1.4;
}

.sq-btn:hover {
    filter: brightness(92%);
    transform: translateY(-1px);
    text-decoration: none;
}

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

.sq-btn-icon {
    font-style: normal;
}

.sq-btn-pdf {
    background: #1e3a5f;
    color: #fff;
}

.sq-btn-approve {
    background: #16a34a;
    color: #fff;
}

.sq-btn-reject {
    background: #dc2626;
    color: #fff;
}

.sq-awaiting-text {
    font-size: .82em;
    color: #9ca3af;
    font-style: italic;
}

/* ── Responsive (stacked cards on mobile) ─────────────────── */
@media (max-width: 640px) {
    .sq-quotes-table thead {
        display: none;
    }

    .sq-quotes-table,
    .sq-quotes-table tbody,
    .sq-quotes-table tr,
    .sq-quotes-table td {
        display: block;
        width: 100%;
    }

    .sq-quotes-table tbody tr {
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0,0,0,.06);
    }

    .sq-quotes-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: .65rem 1rem;
        border-bottom: 1px solid #f3f4f6;
        text-align: right;
    }

    .sq-quotes-table td:last-child {
        border-bottom: none;
    }

    .sq-quotes-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: .78em;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #6b7280;
        text-align: left;
        flex-shrink: 0;
        margin-right: 1rem;
    }

    .sq-col-actions td {
        flex-direction: column;
        align-items: flex-start;
        gap: .4rem;
    }

    .sq-action-group {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ── New statuses ─────────────────────────────────────────── */
.sq-status-ordered { background: #f0fdf4; color: #14532d; border: 1px solid #86efac; }

/* ── Cart / Proceed button ────────────────────────────────── */
.sq-btn-cart {
    background: #0f766e;
    color: #fff;
    animation: sq-pulse 1.8s ease-in-out infinite;
}

@keyframes sq-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(15,118,110,.5); }
    50%       { box-shadow: 0 0 0 6px rgba(15,118,110,0); }
}

.sq-btn-cart:hover {
    background: #0d6159;
    color: #fff;
}

/* ── Ordered confirmed text ───────────────────────────────── */
.sq-ordered-text {
    font-size: .85em;
    font-weight: 600;
    color: #14532d;
    display: flex;
    align-items: center;
    gap: .3em;
}

/* ── WC notice cart link ──────────────────────────────────── */
.woocommerce-message .sq-cart-link,
.woocommerce-notice .sq-cart-link {
    font-weight: 700;
    text-decoration: underline;
    margin-left: .35em;
}
