/**
 * Empty States Enhancement
 * 
 * @package Silva_Customer_Portal
 * @since 2.6.0
 */

/* ================================
   EMPTY STATE COMPONENTS
   ================================ */

.silva-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    margin: 20px 0;
}

.silva-empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.silva-empty-state-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
}

.silva-empty-state-description {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 24px 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.silva-empty-state-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.silva-empty-state-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.silva-empty-state-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 67, 133, 0.2);
}

.silva-empty-state-cta-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.silva-empty-state-cta-secondary:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 67, 133, 0.1);
}

/* Specific empty states */
.silva-empty-estimates {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #bae6fd;
}

.silva-empty-projects {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}

.silva-empty-messages {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
}

.silva-empty-invoices {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #f9a8d4;
}

/* Help box for empty states */
.silva-empty-state-help {
    margin-top: 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.silva-empty-state-help-title {
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
    font-size: 14px;
}

.silva-empty-state-help-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.silva-empty-state-help-list li {
    display: flex;
    align-items: start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #4b5563;
}

.silva-empty-state-help-list li:last-child {
    margin-bottom: 0;
}

.silva-empty-state-help-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: 700;
    flex-shrink: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .silva-empty-state {
        padding: 40px 16px;
    }
    
    .silva-empty-state-icon {
        font-size: 48px;
    }
    
    .silva-empty-state-title {
        font-size: 18px;
    }
    
    .silva-empty-state-description {
        font-size: 14px;
    }
    
    .silva-empty-state-actions {
        flex-direction: column;
    }
    
    .silva-empty-state-cta {
        width: 100%;
        justify-content: center;
    }
}

/* ================================
   SEARCH & FILTER BAR
   ================================ */

.silva-search-bar {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.silva-search-input-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.silva-search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.silva-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(1, 67, 133, 0.1);
}

.silva-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.silva-filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.silva-filter-button {
    padding: 8px 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.silva-filter-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f0f9ff;
}

.silva-filter-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.silva-search-clear {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 13px;
    transition: color 0.2s;
}

.silva-search-clear:hover {
    color: #111827;
}

.silva-search-results-count {
    font-size: 13px;
    color: #6b7280;
    padding: 8px 0;
}

/* Mobile search bar */
@media (max-width: 768px) {
    .silva-search-bar {
        flex-direction: column;
    }
    
    .silva-search-input-wrapper {
        width: 100%;
    }
    
    .silva-filter-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .silva-filter-button {
        flex: 1;
        text-align: center;
        padding: 10px 8px;
        font-size: 12px;
    }
}

/* ================================
   ENHANCED STATUS BADGES
   ================================ */

.silva-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.silva-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Status colors */
.silva-status-sent {
    background: #dbeafe;
    color: #1e40af;
}

.silva-status-sent .silva-status-dot {
    background: #3b82f6;
}

.silva-status-approved,
.silva-status-accepted {
    background: #d1fae5;
    color: #065f46;
}

.silva-status-approved .silva-status-dot,
.silva-status-accepted .silva-status-dot {
    background: #10b981;
}

.silva-status-rejected,
.silva-status-declined {
    background: #fee2e2;
    color: #991b1b;
}

.silva-status-rejected .silva-status-dot,
.silva-status-declined .silva-status-dot {
    background: #ef4444;
}

.silva-status-expired {
    background: #fef3c7;
    color: #92400e;
}

.silva-status-expired .silva-status-dot {
    background: #f59e0b;
}

.silva-status-pending {
    background: #e0e7ff;
    color: #3730a3;
}

.silva-status-pending .silva-status-dot {
    background: #6366f1;
}

.silva-status-completed {
    background: #d1fae5;
    color: #065f46;
}

.silva-status-completed .silva-status-dot {
    background: #10b981;
}

.silva-status-in-progress {
    background: #fef3c7;
    color: #92400e;
}

.silva-status-in-progress .silva-status-dot {
    background: #f59e0b;
    animation: silva-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes silva-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.silva-status-draft {
    background: #f3f4f6;
    color: #374151;
}

.silva-status-draft .silva-status-dot {
    background: #9ca3af;
}

/* ================================
   EXPIRED ESTIMATE WARNING
   ================================ */

.silva-expired-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    display: flex;
    gap: 12px;
    align-items: start;
}

.silva-expired-warning-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.silva-expired-warning-content {
    flex: 1;
}

.silva-expired-warning-title {
    font-weight: 700;
    color: #92400e;
    margin: 0 0 6px 0;
    font-size: 14px;
}

.silva-expired-warning-message {
    color: #78350f;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.silva-expired-warning-action {
    margin-top: 12px;
}

.silva-expired-warning-action a {
    color: #92400e;
    font-weight: 600;
    text-decoration: underline;
}

.silva-expired-warning-action a:hover {
    color: #78350f;
}

/* ================================
   EXPIRING SOON BADGE
   ================================ */

.silva-expiring-soon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.silva-expiring-soon-icon {
    animation: silva-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
