/* Client Dashboard uses the shared SaaS dashboard CSS from vendor-dashboard.css */
/* This file is kept for any client-specific overrides */

.sd-client-dash .sd-saas-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

/* Apply same client sidebar style inside Woo My Account wrapper */
.sd-client-wc-account .sd-saas-sidebar,
.sd-wc-vendor-account-wrap .sd-saas-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

/* Strong active state for client tabs (background + text color) */
.sd-client-dash .sd-nav-item.active,
.sd-client-wc-account .sd-nav-item.active,
.sd-wc-vendor-account-wrap .sd-nav-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.28) 0%, rgba(59, 130, 246, 0.16) 100%) !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.45);
}

.sd-client-dash .sd-nav-item.active .dashicons,
.sd-client-wc-account .sd-nav-item.active .dashicons,
.sd-wc-vendor-account-wrap .sd-nav-item.active .dashicons {
    color: #bfdbfe;
}

/* Clearer hover state across sidebar menu */
.sd-client-dash .sd-nav-item:hover,
.sd-client-wc-account .sd-nav-item:hover,
.sd-wc-vendor-account-wrap .sd-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc !important;
    transform: translateX(2px);
}

.sd-client-dash .sd-nav-item:hover .dashicons,
.sd-client-wc-account .sd-nav-item:hover .dashicons,
.sd-wc-vendor-account-wrap .sd-nav-item:hover .dashicons {
    color: #e2e8f0;
}

/* Keep active state dominant while hovering current tab */
.sd-client-dash .sd-nav-item.active:hover,
.sd-client-wc-account .sd-nav-item.active:hover,
.sd-wc-vendor-account-wrap .sd-nav-item.active:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.36) 0%, rgba(59, 130, 246, 0.2) 100%) !important;
    color: #ffffff !important;
    transform: none;
}

.sd-assigned-provider {
    margin-top: 12px;
    padding: 12px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    font-size: 13px;
    color: #1e3a5f;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sd-assigned-provider strong {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1d4ed8;
}

.sd-assigned-provider .sd-provider-email,
.sd-assigned-provider .sd-provider-phone {
    font-size: 12px;
    color: #475569;
}

/* 48-hour dispute countdown */
.sd-dispute-countdown {
    margin-bottom: 14px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
}

.sd-dispute-countdown__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1d4ed8;
    margin-bottom: 6px;
}

.sd-dispute-countdown__label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.sd-dispute-countdown__timer {
    font-size: 28px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    line-height: 1.1;
    margin-bottom: 4px;
}

.sd-dispute-countdown__hint,
.sd-dispute-countdown__expired {
    margin: 0;
    font-size: 12px;
    color: #475569;
    line-height: 1.45;
}

.sd-dispute-countdown.is-expired {
    background: #fffbeb;
    border-color: #fcd34d;
}

.sd-dispute-countdown.is-expired .sd-dispute-countdown__label {
    color: #b45309;
}

.sd-dispute-countdown.is-expired .sd-dispute-countdown__expired {
    color: #92400e;
    font-weight: 600;
}

/* Completed jobs tab */
.sd-job-card--completed {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.sd-completed-job-summary {
    margin-top: 14px;
    padding: 12px 14px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
}

.sd-completed-job-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    margin-bottom: 6px;
}

.sd-completed-job-summary__row:last-of-type {
    margin-bottom: 8px;
}

.sd-completed-job-summary__label {
    color: #475569;
}

.sd-completed-job-summary__note {
    margin: 0;
    font-size: 12px;
    color: #166534;
    font-weight: 600;
}

.sd-badge-green {
    background: #dcfce7 !important;
    color: #166534 !important;
}

/* Client: completion feedback + issue discussion */
.sd-client-feedback-card {
    margin-top: 14px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.sd-client-feedback-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.sd-client-feedback-intro {
    margin: 0 0 14px;
    font-size: 13px;
}

.sd-client-feedback-range-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.sd-client-feedback-range-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.sd-client-feedback-pct-output {
    font-size: 18px;
    font-weight: 800;
    color: #2563eb;
}

.sd-client-feedback-range {
    width: 100%;
    margin-bottom: 12px;
    accent-color: #2563eb;
}

.sd-client-feedback-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #475569;
    margin-bottom: 12px;
    cursor: pointer;
}

.sd-client-feedback-check input {
    margin-top: 3px;
}

.sd-client-feedback-note-label span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.sd-client-feedback-note {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 10px 12px;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

.sd-client-discussion {
    margin-top: 14px;
    padding: 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
}

.sd-client-discussion-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
}

.sd-discussion-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0;
    max-height: 280px;
    overflow-y: auto;
}

.sd-discussion-msg {
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 13px;
}

.sd-discussion-msg--client {
    border-left: 3px solid #2563eb;
}

.sd-discussion-msg--vendor {
    border-left: 3px solid #16a34a;
}

.sd-discussion-msg--admin {
    border-left: 3px solid #9333ea;
}

.sd-discussion-msg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #64748b;
}

.sd-discussion-msg-meta strong {
    color: #0f172a;
    font-size: 13px;
}

.sd-discussion-msg-body {
    color: #334155;
    line-height: 1.5;
    white-space: pre-wrap;
}

.sd-discussion-reply-input {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.sd-client-issue-review-card {
    margin-bottom: 16px;
    padding: 14px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 12px;
}

.sd-client-issue-review-heading {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #14532d;
}

.sd-client-issue-review-hint {
    margin: 0 0 12px !important;
    font-size: 12px;
}

.sd-client-issue-unified-form .sd-client-feedback-note-label {
    margin-bottom: 12px;
}

.sd-client-issue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.sd-client-issue-actions .sd-btn {
    flex: 1 1 140px;
    justify-content: center;
}

.sd-discussion-locked-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    margin-bottom: 12px;
}

/* History: segmented filter + AJAX loading */
.sd-history-filter-toolbar {
    margin-bottom: 18px;
}

.sd-history-filter-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 10px;
}

.sd-history-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 4px;
    padding: 5px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border-radius: 14px;
    border: 1px solid #334155;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sd-history-filter-btn {
    appearance: none;
    margin: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    text-align: center;
}

.sd-history-filter-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.sd-history-filter-btn.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.sd-history-filter-btn:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.sd-history-table-panel {
    position: relative;
    min-height: 100px;
}

.sd-history-wrap.is-loading .sd-history-table-wrap {
    opacity: 0.45;
    pointer-events: none;
}

.sd-history-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(248, 250, 252, 0.72);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.sd-history-wrap.is-loading .sd-history-loading {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sd-history-loading-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: sd-history-spin 0.7s linear infinite;
}

.sd-history-loading-text {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

@keyframes sd-history-spin {
    to {
        transform: rotate(360deg);
    }
}

.sd-history-table-wrap {
    overflow-x: auto;
}

.sd-history-filter-empty-cell {
    text-align: center;
    padding: 28px 16px !important;
    color: #64748b;
    font-size: 14px;
    background: #f8fafc;
}
