/* ==========================================================================
   WiseStock - Dashboard Widget Styles
   Modern & Professional Design
   ========================================================================== */

.wisestock-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fff;
    overflow: hidden;
}

.wisestock-warning-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wisestock-warning-notice::before {
    content: "⚠️";
    font-size: 16px;
}

.wisestock-notification-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 15px 10px;
}

.wisestock-notification-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    padding: 16px 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wisestock-notification-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #dee2e6;
}

.wisestock-notification-card:hover {
    transform: translateY(-2px);
}

.wisestock-notification-card.critical::before {
    background: linear-gradient(90deg, #dc3545, #c82333);
}

.wisestock-notification-card.warning::before {
    background: linear-gradient(90deg, #ffc107, #e0a800);
}

.wisestock-notification-card.mild::before {
    background: linear-gradient(90deg, #17a2b8, #138496);
}

.wisestock-notification-card:not(.critical):not(.warning):not(.mild)::before {
    background: linear-gradient(90deg, #6c757d, #5a6268);
}

.wisestock-notification-count {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #212529;
    line-height: 1;
}

.wisestock-notification-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.wisestock-section {
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.wisestock-section h4 {
    margin: 0 !important;
    padding: 16px 20px 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #212529 !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-bottom: 1px solid #dee2e6 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.wisestock-section h4::before {
    content: '' !important;
    width: 4px !important;
    height: 16px !important;
    background: #2271b1 !important;
}

.wisestock-product-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wisestock-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.wisestock-product-item:hover {
    background-color: #f8f9fa;
}

.wisestock-product-item:last-child {
    border-bottom: none;
}

.wisestock-product-name {
    font-weight: 500;
    color: #212529;
    font-size: 14px;
    line-height: 1.4;
}

.wisestock-product-name a {
    color: #007cba;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wisestock-product-name a:hover {
    color: #005a87;
    text-decoration: underline;
}

.wisestock-product-stock {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.wisestock-priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
    justify-content: center;
}

.wisestock-priority-badge.critical {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.wisestock-priority-badge.warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.wisestock-priority-badge.mild {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.wisestock-velocity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.wisestock-velocity-item:hover {
    background-color: #f8f9fa;
}

.wisestock-velocity-item:last-child {
    border-bottom: none;
}

.wisestock-velocity-value {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wisestock-confidence-text {
    font-size: 11px;
    color: #6c757d;
    font-weight: 400;
}

.wisestock-quick-actions {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.wisestock-quick-actions .wisestock-btn {
    text-align: center;
    padding: 12px 16px;
    background: #2271b1;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 3px;
}

.wisestock-quick-actions .wisestock-btn:hover {
    background: #0a4b78;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    
    .wisestock-notification-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .wisestock-notification-card {
        padding: 12px 8px;
    }
    
    .wisestock-notification-count {
        font-size: 20px;
    }
    
    .wisestock-section h4 {
        padding: 12px 16px 8px;
        font-size: 14px;
    }
    
    .wisestock-product-item,
    .wisestock-velocity-item {
        padding: 10px 16px;
    }
    
    .wisestock-quick-actions {
        padding: 16px;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .wisestock-quick-actions .wisestock-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Timebound Dashboard Widget Styles
   ========================================================================== */

.wisestock-timebound-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border: 1px solid #e6e9ff;
    border-radius: 8px;
    margin: 0 0 20px 0;
    overflow: hidden;
}

.wisestock-timebound-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.wisestock-timebound-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wisestock-timebound-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.wisestock-timebound-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wisestock-timebound-label {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wisestock-timebound-value {
    font-size: 13px;
    color: #333;
    font-weight: 600;
}

.wisestock-timebound-features {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.wisestock-feature-indicator {
    background: #e9ecef;
    color: #6c757d;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wisestock-feature-indicator.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.wisestock-market-changes {
    border-top: 1px solid #e6e9ff;
    padding-top: 15px;
    margin-top: 15px;
}

.wisestock-market-changes h5 {
    margin: 0 0 10px 0;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wisestock-market-change-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(230, 233, 255, 0.5);
}

.wisestock-market-change-item:last-child {
    border-bottom: none;
}

.wisestock-market-change-product {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    flex: 1;
}

.wisestock-market-change-details {
    font-size: 11px;
    font-weight: 600;
}

.wisestock-change-direction {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.wisestock-change-direction.increasing {
    background: #d4edda;
    color: #155724;
}

.wisestock-change-direction.decreasing {
    background: #f8d7da;
    color: #721c24;
}

.wisestock-market-changes-more {
    padding-top: 10px;
    text-align: center;
    border-top: 1px solid rgba(230, 233, 255, 0.5);
    margin-top: 10px;
}

.wisestock-market-changes-more a {
    color: #667eea;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wisestock-market-changes-more a:hover {
    color: #5a67d8;
}

.wisestock-no-market-changes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    color: #28a745;
    font-size: 12px;
    font-weight: 500;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
    margin-top: 15px;
    border-top: 1px solid #e6e9ff;
}

.wisestock-no-market-changes .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive adjustments for timebound section */
@media (max-width: 782px) {
    .wisestock-timebound-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .wisestock-market-change-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .wisestock-market-change-details {
        align-self: flex-end;
    }
}
