/* ═══════════════════════════════════════════════
   WooCommerce Customize Order – Front-End Styles
═══════════════════════════════════════════════ */

.wco-wrapper {
    max-width: 760px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

/* Header */
.wco-header {
    text-align: center;
    margin-bottom: 32px;
}

.wco-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.wco-header p {
    color: #666;
    font-size: 1rem;
}

/* Alerts */
.wco-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.wco-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wco-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Form Card */
.wco-form {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

/* Rows */
.wco-row {
    display: flex;
    gap: 20px;
    margin-bottom: 22px;
}

.wco-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wco-field.wco-full  { flex: 1 0 100%; }
.wco-field.wco-half  { flex: 0 0 calc(50% - 10px); }

/* Labels */
.wco-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 7px;
}

.wco-field label .required {
    color: #e74c3c;
    margin-left: 2px;
}

.wco-field label .optional {
    color: #999;
    font-weight: 400;
    font-size: 0.8rem;
    margin-left: 4px;
}

/* Inputs & Textarea */
.wco-form input[type="text"],
.wco-form input[type="email"],
.wco-form input[type="tel"],
.wco-form input[type="number"],
.wco-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d0d5dd;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.wco-form input[readonly] {
    background: #f0f4f8;
    color: #555;
    cursor: not-allowed;
}

.wco-form input:focus,
.wco-form textarea:focus {
    outline: none;
    border-color: #7c4dff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124,77,255,0.12);
}

.wco-form textarea {
    resize: vertical;
    min-height: 130px;
}

/* Submit Button */
.wco-submit-wrap {
    margin-top: 28px;
    text-align: center;
}

.wco-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #7c4dff, #448aff);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(124,77,255,0.35);
}

.wco-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124,77,255,0.45);
}

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

.wco-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Login hint */
.wco-login-hint {
    text-align: center;
    color: #888;
    font-size: 0.875rem;
    margin-top: 18px;
}

.wco-login-hint a { color: #7c4dff; text-decoration: none; }
.wco-login-hint a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 600px) {
    .wco-form      { padding: 24px 18px; }
    .wco-row       { flex-direction: column; gap: 0; }
    .wco-field.wco-half { flex: 1; }
}

/* ═══════════════════════════════════════════════
   My Orders – List & Detail Styles
═══════════════════════════════════════════════ */

/* ── Back Button ── */
.wco-back-btn {
    display: inline-block;
    color: #7c4dff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: opacity 0.2s;
}
.wco-back-btn:hover { opacity: 0.75; }

/* ── Status Badge ── */
.wco-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}
.wco-status-pending    { background: #fff3cd; color: #856404; }
.wco-status-approved   { background: #ede9fe; color: #5b21b6; }
.wco-status-processing { background: #cce5ff; color: #004085; }
.wco-status-completed  { background: #d4edda; color: #155724; }
.wco-status-cancelled  { background: #e2e3e5; color: #383d41; }

/* ── Empty State ── */
.wco-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 2px dashed #e0e0e0;
    border-radius: 16px;
}
.wco-empty-icon { font-size: 3.5rem; margin-bottom: 14px; }
.wco-empty-state h3 { font-size: 1.4rem; color: #333; margin: 0 0 8px; }
.wco-empty-state p  { color: #888; margin-bottom: 22px; }

/* ── Orders List Cards ── */
.wco-orders-list { display: flex; flex-direction: column; gap: 16px; }

.wco-order-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
    gap: 20px;
}
.wco-order-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wco-order-card-left  { flex: 1; }
.wco-order-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }

.wco-order-id {
    font-size: 1.1rem;
    font-weight: 700;
    color: #7c4dff;
    margin-bottom: 6px;
}

.wco-order-meta {
    display: flex;
    gap: 14px;
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.wco-order-desc {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
}

.wco-view-btn {
    display: inline-block;
    background: #f0ebff;
    color: #7c4dff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.wco-view-btn:hover { background: #e0d4ff; }

/* ── Detail View ── */
.wco-myorders-detail { max-width: 860px; }

.wco-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.wco-detail-header h2 { margin: 0; font-size: 1.6rem; color: #1a1a2e; }

.wco-detail-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.wco-dcard {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.wco-dcard h4 {
    margin: 0 0 14px;
    font-size: 0.95rem;
    color: #7c4dff;
    border-bottom: 2px solid #f0ebff;
    padding-bottom: 8px;
}
.wco-dcard-full { grid-column: 1 / -1; }

.wco-dcard ul { list-style: none; margin: 0; padding: 0; }
.wco-dcard ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.9rem;
    gap: 12px;
}
.wco-dcard ul li:last-child { border-bottom: none; }
.wco-dcard ul li span { color: #888; flex-shrink: 0; }
.wco-dcard ul li strong { color: #333; text-align: right; }

/* Description box */
.wco-desc-box {
    background: #fafafa;
    border: 1px solid #efefef;
    border-radius: 8px;
    padding: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #444;
}

/* ── Progress Tracker ── */
.wco-progress-track {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    flex-wrap: nowrap;
}

.wco-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.wco-step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e9ecef;
    color: #aaa;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.wco-step.done .wco-step-circle {
    background: #d4edda;
    border-color: #46b450;
    color: #155724;
}

.wco-step.active .wco-step-circle {
    background: linear-gradient(135deg, #7c4dff, #448aff);
    border-color: #7c4dff;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(124,77,255,0.2);
}

.wco-step-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #aaa;
    text-align: center;
}
.wco-step.done .wco-step-label,
.wco-step.active .wco-step-label { color: #333; }

.wco-step-line {
    flex: 1;
    height: 3px;
    background: #e0e0e0;
    margin: 0 4px;
    margin-bottom: 26px;
    border-radius: 2px;
    transition: background 0.3s;
}
.wco-step-line.done { background: #46b450; }

/* Responsive */
@media (max-width: 640px) {
    .wco-order-card       { flex-direction: column; align-items: flex-start; }
    .wco-order-card-right { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
    .wco-detail-cards     { grid-template-columns: 1fr; }
    .wco-dcard-full       { grid-column: 1; }
    .wco-progress-track   { gap: 4px; }
    .wco-step             { min-width: 60px; }
    .wco-step-circle      { width: 36px; height: 36px; font-size: 0.85rem; }
    .wco-step-label       { font-size: 0.7rem; }
}

/* ═══════════════════════════════════════════════
   WooCommerce My Account – My Custom Request
═══════════════════════════════════════════════ */

/* Back link */
.wco-ma-back {
    display: inline-block;
    color: #7c4dff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 18px;
}
.wco-ma-back:hover { text-decoration: underline; }

/* Detail header */
.wco-ma-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.wco-ma-detail-header h3 { margin: 0; font-size: 1.3rem; }

/* Status badges */
.wco-ma-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.wco-ma-pending    { background: #fff3cd; color: #856404; }
.wco-ma-approved   { background: #ede9fe; color: #5b21b6; font-weight: 700; }
.wco-ma-processing { background: #cce5ff; color: #004085; }
.wco-ma-completed  { background: #d4edda; color: #155724; }
.wco-ma-cancelled  { background: #e2e3e5; color: #383d41; }

/* Progress tracker */
.wco-ma-progress {
    display: flex;
    align-items: center;
    margin: 0 0 28px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #efefef;
    border-radius: 10px;
}

.wco-ma-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.wco-ma-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e9ecef;
    color: #aaa;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
}
.wco-ma-step.done .wco-ma-circle   { background: #d4edda; border-color: #46b450; color: #155724; }
.wco-ma-step.active .wco-ma-circle { background: linear-gradient(135deg,#7c4dff,#448aff); border-color: #7c4dff; color: #fff; box-shadow: 0 0 0 4px rgba(124,77,255,0.18); }

.wco-ma-step-label              { font-size: 0.75rem; font-weight: 600; color: #aaa; text-align: center; }
.wco-ma-step.done .wco-ma-step-label,
.wco-ma-step.active .wco-ma-step-label { color: #333; }

.wco-ma-line      { flex: 1; height: 3px; background: #dee2e6; margin: 0 6px 24px; border-radius: 2px; }
.wco-ma-line.done { background: #46b450; }

/* Detail grid */
.wco-ma-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.wco-ma-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.wco-ma-card h4 {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: #7c4dff;
    border-bottom: 2px solid #f0ebff;
    padding-bottom: 8px;
}
.wco-ma-full { grid-column: 1 / -1; }

.wco-ma-table { width: 100%; border-collapse: collapse; }
.wco-ma-table tr { border-bottom: 1px solid #f5f5f5; }
.wco-ma-table tr:last-child { border: none; }
.wco-ma-table th, .wco-ma-table td { padding: 7px 8px; font-size: 0.875rem; text-align: left; }
.wco-ma-table th { color: #888; width: 110px; font-weight: 600; }
.wco-ma-table td { color: #333; }

.wco-ma-desc {
    background: #f8f9fa;
    border: 1px solid #efefef;
    border-radius: 8px;
    padding: 14px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #444;
}

/* Empty state */
.wco-ma-empty {
    text-align: center;
    padding: 50px 20px;
    border: 2px dashed #ddd;
    border-radius: 10px;
}
.wco-ma-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.wco-ma-empty p    { color: #777; margin-bottom: 8px; }
.wco-ma-empty .button { margin-top: 12px; }

@media (max-width: 640px) {
    .wco-ma-grid     { grid-template-columns: 1fr; }
    .wco-ma-full     { grid-column: 1; }
    .wco-ma-progress { padding: 14px 8px; }
    .wco-ma-step     { min-width: 60px; }
    .wco-ma-circle   { width: 36px; height: 36px; font-size: 0.8rem; }
}

/* ── Payment Status Badges (frontend) ── */
.wco-pay-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.wco-pay-paid     { background: #d4edda; color: #155724; }
.wco-pay-pending  { background: #fff3cd; color: #856404; }
.wco-pay-failed   { background: #f8d7da; color: #721c24; }
.wco-pay-refunded { background: #e2e3e5; color: #383d41; }

/* ── Form Section Titles ── */
.wco-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #4f46e5;
    border-bottom: 2px solid #e0e7ff;
    padding-bottom: 6px;
    margin: 24px 0 14px;
    grid-column: 1 / -1;
}

/* ── Pay Now button in order list ── */
.wco-pay-now-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 14px;
    background: #22c55e;
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
}
.wco-pay-now-btn:hover { background: #16a34a; }

/* ── Detail Cards Grid ── */
.wco-detail-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.wco-dcard {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
}
.wco-dcard h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}
.wco-dcard ul { list-style: none; margin: 0; padding: 0; }
.wco-dcard ul li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid #f9fafb;
}
.wco-dcard ul li span { color: #6b7280; }
.wco-dcard-full { grid-column: 1 / -1; }
.wco-payment-info-card { border-color: #a7f3d0; background: #f0fdf4; }
.wco-desc-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

/* ── Failed payment card ── */
.wco-payment-failed-card { border-color: #f5c6cb !important; background: #fff5f5 !important; }

/* ── Payment row in order list card ── */
.wco-order-payment-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0 4px;
    font-size: 13px;
}
.wco-order-payment-label {
    color: #6b7280;
    font-weight: 500;
}
.wco-order-payment-value {
    color: #111827;
    font-weight: 600;
}
