/**
 * Frontend Styles (Vendor Dashboard) - Tailwind-inspired Modern Design
 * 
 * @package MP_Vendor_RFQ
 */

/* === Base Layout === */
.mp-vendor-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

.mp-vendor-dashboard h2 {
    margin-bottom: 20px;
    color: #111827;
    font-size: 24px;
    font-weight: 700;
}

/* === Notifications Alert === */
.mp-notifications-alert {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-notifications-alert a {
    color: #92400E;
    text-decoration: underline;
    font-weight: 600;
    font-size: 14px;
}

.mp-notifications-alert a:hover {
    text-decoration: underline;
}

/* === Dashboard Stats - Compact Grid === */
.mp-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.mp-stat-box {
    background: linear-gradient(135deg, #c6603f 0%, #c65129 100%);
    color: #fff;
    padding: 16px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.mp-stat-box .dashicons {
    font-size: 42px;
    width: 42px;
    height: 42px;
    opacity: 0.25;
    position: absolute;
    top: 12px;
    right: 12px;
}

.mp-stat-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.mp-stat-box h3 {
    font-size: 28px;
    margin: 0 0 4px 0;
    font-weight: 700;
}

.mp-stat-box p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* === Dashboard Layout - Vertical Tabs === */
.mp-dashboard-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* === Tabs - Vertical Sidebar === */
.mp-dashboard-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 225px;
    flex-shrink: 0;
}

.mp-tab-link {
    padding: 12px 16px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    text-decoration: none;
    color: #6B7280;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.15s ease;
    position: relative;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-tab-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mp-tab-link:hover {
    background: #F3F4F6;
    color: #374151;
    border-color: #D1D5DB;
}

.mp-tab-link.active {
    background: #c6603f;
    color: #fff;
    border: none;
    box-shadow: 0 1px 2px rgba(102, 126, 234, 0.2);
}
.mp-logout-link {
    margin-top: 12px;
    /* border-top: 2px solid #E5E7EB;
    padding-top: 24px !important; */
    background: #FEF2F2 !important;
    border-color: #FCA5A5 !important;
    color: #DC2626 !important;
}

.mp-logout-link:hover {
    background: #FEE2E2 !important;
    border-color: #F87171 !important;
    color: #B91C1C !important;
}

.mp-logout-link .dashicons {
    color: #DC2626;
}

.mp-logout-link:hover .dashicons {
    color: #B91C1C;
}

.mp-notification-badge {
    background: #EF4444;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

.mp-tab-link.active .mp-notification-badge {
    background: white;
    color: #EF4444;
}

/* === Dashboard Content === */
.mp-dashboard-content {
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    flex: 1;
    min-width: 0;
    min-height: 65vh;
}

.mp-dashboard-content h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #111827;
    font-size: 20px;
    font-weight: 700;
}

/* === RFQ Cards - Compact Modern Design === */
.mp-rfqs-list {
    display: grid;
    gap: 12px;
}

.mp-rfq-card {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    transition: all 0.15s ease;
}

.mp-rfq-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border-color: #D1D5DB;
}

.mp-rfq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #F3F4F6;
}

.mp-rfq-header h4 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.mp-rfq-date {
    color: #999;
    font-size: 13px;
}

.mp-rfq-body {
    margin-bottom: 20px;
}

.mp-rfq-body p {
    margin: 10px 0;
}

.mp-rfq-body ul {
    margin: 10px 0;
    padding-left: 20px;
}

.mp-rfq-body li {
    margin: 5px 0;
}

.mp-expiry-warning,
.mp-deadline-warning {
    padding: 12px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    margin-top: 15px;
}

.mp-urgent {
    color: #dc3545;
    font-weight: 700;
}

.mp-warning {
    color: #ff9800;
}

.mp-overdue {
    color: #dc3545;
    font-weight: 700;
    font-size: 16px;
}

.mp-rfq-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Assigned Card */
.mp-assigned-card {
    border-left: 4px solid #c6603f;
}

.mp-notes-section {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.mp-notes-content {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border-left: 3px solid #c6603f;
    font-size: 14px;
    line-height: 1.6;
}

/* === Buttons - Tailwind-inspired === */
.mp-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mp-btn-primary {
    background: #c6603f;
    color: #fff;
}

.mp-btn-primary:hover {
    background: #5568d3;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

.mp-btn-secondary {
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #E5E7EB;
}

.mp-btn-secondary:hover {
    background: #E5E7EB;
}

.mp-btn-success {
    background: #10B981;
    color: #fff;
}

.mp-btn-success:hover {
    background: #059669;
}

.mp-btn-danger {
    background: #EF4444;
    color: #fff;
}

.mp-btn-danger:hover {
    background: #DC2626;
}

/* === Modal - Clean Design === */
.mp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.mp-modal-content {
    position: relative;
    background: #fff;
    padding: 0;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.mp-modal-close {
    position: absolute;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}
.mp-modal-header span.mp-modal-close {
    top: 15px; 
    right: 20px; 
}

.mp-modal-close:hover {
    color: #333;
}

.mp-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.mp-form-group {
    margin-bottom: 20px;
}

.mp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.mp-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.mp-form-group input:focus {
    outline: none;
    border-color: #c6603f;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mp-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* Status Badges */
.mp-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-status-pending {
    background: #f0f0f1;
    color: #646970;
}

.mp-status-accepted {
    background: #d4edda;
    color: #155724;
}

.mp-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.mp-status-assigned {
    background: #d1ecf1;
    color: #0c5460;
}

.mp-status-completed {
    background: #28a745;
    color: #fff;
}

.mp-status-expired {
    background: #f0f0f1;
    color: #a0a5aa;
}

/* History */
.mp-history-filters {
    margin-bottom: 20px;
}

.mp-filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    margin-right: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mp-filter-btn:hover {
    background: #f5f5f5;
}

.mp-filter-btn.active {
    background: #c6603f;
    color: #fff;
    border-color: #c6603f;
}

.mp-history-list {
    display: grid;
    gap: 15px;
}

.mp-history-date {
    font-weight: 600;
    color: #c6603f;
    min-width: 100px;
    font-size: 14px;
}

.mp-history-content {
    flex: 1;
}

.mp-history-content h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.mp-history-content p {
    margin: 5px 0;
}

/* Notifications */
.mp-notifications-list {
    display: grid;
    gap: 15px;
}

.mp-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.mp-notification-item.mp-unread {
    background: #f0f8ff;
    border-color: #c6603f;
}

.mp-notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
    flex-shrink: 0;
}

.mp-notification-assigned {
    background: #d4edda;
    color: #28a745;
}

.mp-notification-note {
    background: #d1ecf1;
    color: #0c5460;
}

.mp-notification-deadline_alert {
    background: #fff3cd;
    color: #856404;
}

.mp-notification-content {
    flex: 1;
}

.mp-notification-content p {
    margin: 0 0 5px 0;
    color: #333;
}

.mp-notification-time {
    font-size: 12px;
    color: #999;
}

.mp-mark-read-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.mp-mark-read-btn:hover {
    background: #c6603f;
    color: #fff;
    border-color: #c6603f;
}

/* Attachments List */
.mp-attachment-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.mp-attachment-list li {
    padding: 8px 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-attachment-list a {
    color: #c6603f;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.mp-attachment-list a:hover {
    color: #c65129;
    text-decoration: underline;
}

.mp-file-size {
    color: #999;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .mp-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .mp-dashboard-layout {
        flex-direction: column;
    }
    
    .mp-dashboard-tabs {
        min-width: 100%;
        width: 100%;
    }
    
    .mp-tab-link {
        text-align: center;
    }
    
    .mp-rfq-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .mp-rfq-footer {
        flex-direction: column;
    }
    
    .mp-btn {
        width: 100%;
        text-align: center;
    }
    
    .mp-history-item {
        flex-direction: column;
    }
}

/* === My Orders - Compact Modern Layout === */
.mp-order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #F9FAFB;
    border-radius: 6px;
    border: 1px solid #F3F4F6;
}

.mp-info-item {
    display: flex;
    flex-direction: column;
}

.mp-info-label {
    font-size: 11px;
    color: #6B7280;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-info-value {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.mp-highlight-price {
    color: #c6603f;
    font-size: 18px !important;
    font-weight: 700 !important;
}

.mp-deadline-alert {
    padding: 12px;
    background: #D1FAE5;
    border: 1px solid #10B981;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-deadline-alert.mp-warning {
    background: #FEF3C7;
    border-color: #F59E0B;
}

.mp-deadline-alert.mp-urgent {
    background: #FEE2E2;
    border-color: #f5c6cb;
}

.mp-deadline-alert .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.mp-overdue {
    color: #dc3545;
    font-weight: 700;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.mp-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mp-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mp-section h5 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #c6603f;
    color: #333;
    font-size: 1.1em;
}

.mp-items-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.mp-items-table thead {
    background: #f8f9fa;
}

.mp-items-table th,
.mp-items-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.mp-items-table th {
    font-weight: 600;
    color: #495057;
}

.mp-items-table tbody tr:hover {
    background: #f8f9fa;
}

.mp-customer-note {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.mp-customer-note h5 {
    border-bottom-color: #2196f3;
}

.mp-customer-note p {
    margin: 0;
    line-height: 1.6;
}

.mp-attachments-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.mp-attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.mp-attachment-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.mp-attachment-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.mp-attachment-icon {
    font-size: 32px;
    color: #c6603f;
}

.mp-attachment-info {
    flex: 1;
    min-width: 0;
}

.mp-attachment-name {
    display: block;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.mp-attachment-name:hover {
    color: #c6603f;
    text-decoration: underline;
}

.mp-attachment-size {
    display: block;
    font-size: 0.85em;
    color: #999;
}

.mp-notes-section {
    background: #fff9e6;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.mp-notes-section h5 {
    border-bottom-color: #ffc107;
}

.mp-notes-content {
    line-height: 1.6;
    color: #333;
}

.mp-rfq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    margin-top: 20px;
}

.mp-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.mp-btn-primary {
    background: #c6603f;
    color: #fff;
}

.mp-btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.mp-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.mp-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.mp-btn-icon {
    padding: 8px;
    min-width: auto;
}

.mp-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Messages */
.mp-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mp-message-header strong {
    color: #333;
    font-size: 1em;
}

.mp-message-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    background: #c6603f;
    color: #fff;
}

.mp-message-admin .mp-message-badge {
    background: #ffc107;
    color: #333;
}

.mp-message-body {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.mp-message-footer {
    font-size: 0.85em;
    color: #999;
}

.mp-message-form h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
    padding-bottom: 10px;
    border-bottom: 2px solid #c6603f;
}

.dashicons-spin {
    animation: dashicons-spin 1s linear infinite;
}

@keyframes dashicons-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive adjustments for new layout */
/* === Toast Notification === */
.mp-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10B981;
    color: white;
    padding: 2px 5px 2px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 999999;
    animation: mp-toast-slide-in 0.3s ease-out;
    min-width: 300px;
}

.mp-toast.mp-toast-error {
    background: #EF4444;
}

.mp-toast-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.mp-toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.mp-toast-close {
    background: none;
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 16px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.mp-toast-close:hover {
    opacity: 1;
}

@keyframes mp-toast-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes mp-toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.mp-toast.mp-toast-hiding {
    animation: mp-toast-slide-out 0.3s ease-out forwards;
}

@media (max-width: 768px) {
    .mp-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .mp-order-info-grid {
        grid-template-columns: 1fr;
    }
    
    .mp-attachment-grid {
        grid-template-columns: 1fr;
    }
    
    .mp-items-table {
        font-size: 0.9em;
    }
    
    .mp-items-table th,
    .mp-items-table td {
        padding: 8px;
    }
    
    .mp-rfq-actions {
        flex-direction: column;
    }
    
    .mp-btn {
        width: 100%;
        justify-content: center;
    }
}

