/**
 * Buyer Dashboard Styles
 * Comprehensive styling for buyer dashboard panels, forms, and layouts
 *
 * @package Lucid_Pulse_Marketplace
 * @subpackage CSS/Dashboard
 * @since 2.0.0
 */

/* ========================================
   Dashboard Panel Base Styles
   ======================================== */

.lpm-dashboard-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.lpm-dashboard-panel > h2 {
    margin: 0 0 25px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

.lpm-dashboard-panel > h3 {
    margin: 25px 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

/* ========================================
   Buyer Overview Styles
   ======================================== */

.lpm-buyer-overview {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
}

.lpm-overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.lpm-stat-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.lpm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.lpm-stat-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.lpm-stat-content {
    flex: 1;
}

.lpm-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.lpm-stat-label {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* ========================================
   Quick Actions Grid
   ======================================== */

.lpm-buyer-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.lpm-action-item {
    padding: 25px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lpm-action-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.lpm-action-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

.lpm-action-item:hover::before {
    transform: scaleX(1);
}

.lpm-action-item.lpm-action-seller {
    background: linear-gradient(135deg, #fef3c7 0%, #fef08a 100%);
    border-color: #fcd34d;
}

.lpm-action-item.lpm-action-seller:hover {
    box-shadow: 0 8px 20px rgba(252, 211, 77, 0.3);
    border-color: #f59e0b;
}

.lpm-action-item.lpm-action-seller::before {
    background: linear-gradient(90deg, #f59e0b, #dc2626);
}

.lpm-action-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.lpm-action-item h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.lpm-action-item p {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.lpm-action-note {
    margin-top: 12px !important;
    font-size: 12px !important;
    color: #059669 !important;
    font-weight: 500 !important;
}

/* ========================================
   Recent Orders Section
   ======================================== */

.lpm-recent-orders {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
}

.lpm-recent-orders h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.lpm-orders-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.lpm-orders-list thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.lpm-orders-list th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lpm-orders-list td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.lpm-orders-list tbody tr:hover {
    background: #f9fafb;
}

.lpm-orders-list tbody tr:last-child td {
    border-bottom: none;
}

.lpm-view-all {
    text-align: right;
    margin-top: 15px;
    font-size: 14px;
}

.lpm-view-all a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.lpm-view-all a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ========================================
   Orders Page Styles
   ======================================== */

.lpm-buyer-orders {
    background: #ffffff;
}

.lpm-orders-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.lpm-summary-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    transition: all 0.2s;
}

.lpm-summary-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.lpm-summary-icon {
    font-size: 32px;
    line-height: 1;
}

.lpm-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.lpm-summary-label {
    font-size: 13px;
    color: #6b7280;
}

.lpm-orders-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.lpm-orders-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.lpm-orders-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.lpm-orders-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lpm-orders-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #374151;
}

.lpm-orders-table tbody tr:hover {
    background: #f9fafb;
}

.lpm-orders-table tbody tr:last-child td {
    border-bottom: none;
}

.lpm-order-id {
    font-weight: 600;
    color: #1f2937;
}

.lpm-order-total {
    font-weight: 600;
    color: #065f46;
}

.lpm-pagination {
    margin-top: 30px;
    text-align: center;
}

.lpm-pagination .page-numbers {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 2px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-decoration: none;
    color: #3b82f6;
    background: #ffffff;
    transition: all 0.2s;
}

.lpm-pagination .page-numbers:hover,
.lpm-pagination .page-numbers.current {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.lpm-pagination .prev,
.lpm-pagination .next {
    color: #6b7280;
}

.lpm-pagination .prev:hover,
.lpm-pagination .next:hover {
    color: #1f2937;
}

/* ========================================
   Empty State
   ======================================== */

.lpm-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
}

.lpm-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
}

.lpm-empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.lpm-empty-state p {
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.lpm-empty-state .button {
    margin-top: 10px;
}

/* ========================================
   Status Badges
   ======================================== */

.lpm-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.lpm-status-badge.lpm-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.lpm-status-badge.lpm-status-completed,
.lpm-status-badge.lpm-status-completed-delivery {
    background: #dcfce7;
    color: #166534;
}

.lpm-status-badge.lpm-status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.lpm-status-badge.lpm-status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.lpm-status-badge.lpm-status-shipped {
    background: #e0e7ff;
    color: #3730a3;
}

/* ========================================
   Button Styles
   ======================================== */

.button,
.lpm-btn {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.button:hover,
.lpm-btn:hover {
    border-color: #9ca3af;
    background: #f3f4f6;
}

.button-primary,
.lpm-btn-primary {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.button-primary:hover,
.lpm-btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.button-large {
    padding: 12px 24px !important;
    font-size: 15px !important;
}

.button-small {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

/* ========================================
   Notice/Alert Styles
   ======================================== */

.lpm-notice {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.lpm-notice-success {
    background: #f0fdf4;
    border-left-color: #22c55e;
    color: #166534;
}

.lpm-notice-success p {
    margin: 0;
    font-weight: 500;
}

.lpm-notice-warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

.lpm-notice-error {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.lpm-notice-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

/* ========================================
   Settings Form Styles
   ======================================== */

.lpm-settings-form {
    max-width: 100%;
}

.lpm-settings-section {
    margin-bottom: 30px;
    padding: 25px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.lpm-settings-section h3 {
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.lpm-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.lpm-settings-field {
    display: flex;
    flex-direction: column;
}

.lpm-settings-field.lpm-field-full {
    grid-column: 1 / -1;
}

.lpm-settings-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.lpm-settings-field input[type="text"],
.lpm-settings-field input[type="email"],
.lpm-settings-field input[type="tel"],
.lpm-settings-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
}

.lpm-settings-field input:focus,
.lpm-settings-field select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lpm-settings-field input:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.lpm-field-description {
    margin: 6px 0 0 0;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

.lpm-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* ========================================
   Stripe Status Styles
   ======================================== */

.lpm-stripe-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lpm-stripe-connected {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0 !important;
}

.lpm-stripe-disconnected {
    background: linear-gradient(135deg, #fef3c7 0%, #fef08a 100%);
    border-color: #fcd34d !important;
}

.lpm-stripe-action {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .lpm-dashboard-panel {
        padding: 20px;
    }

    .lpm-dashboard-panel > h2 {
        font-size: 22px;
    }

    .lpm-overview-stats,
    .lpm-buyer-quick-actions,
    .lpm-orders-summary {
        grid-template-columns: 1fr;
    }

    .lpm-action-item {
        padding: 20px;
    }

    .lpm-settings-grid {
        grid-template-columns: 1fr;
    }

    .lpm-settings-field.lpm-field-full {
        grid-column: auto;
    }

    .lpm-orders-table {
        font-size: 12px;
    }

    .lpm-orders-table th,
    .lpm-orders-table td {
        padding: 8px 12px;
    }

    .lpm-pagination {
        margin-top: 20px;
    }

    .lpm-pagination .page-numbers {
        padding: 4px 8px;
        margin: 0 1px;
        font-size: 12px;
    }

    .lpm-empty-state {
        padding: 40px 15px;
    }

    .lpm-empty-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }

    .lpm-empty-state h3 {
        font-size: 18px;
    }

    .lpm-empty-state p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .lpm-dashboard-panel {
        padding: 15px;
        border-radius: 8px;
    }

    .lpm-dashboard-panel > h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .lpm-stat-card {
        padding: 15px;
    }

    .lpm-stat-icon {
        font-size: 24px;
    }

    .lpm-stat-value {
        font-size: 16px;
    }

    .lpm-summary-card {
        padding: 15px;
    }

    .lpm-action-item {
        padding: 15px;
    }

    .lpm-action-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .lpm-action-item h3 {
        font-size: 14px;
    }

    .button,
    .button-primary {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .lpm-dashboard-header,
    .lpm-dashboard-nav-wrapper,
    .lpm-dashboard-header-action,
    .lpm-action-item,
    .lpm-pagination,
    .button {
        display: none;
    }

    .lpm-dashboard-panel {
        page-break-inside: avoid;
        box-shadow: none;
    }
}
