/* Spinning animation for delete button */
.abd-spinning {
    animation: abd-spin 1s linear infinite;
}

@keyframes abd-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Notification styles (if not already added) */
.abd-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    max-width: 300px;
}

.abd-notification-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.abd-notification-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

/* ===== ANALYTICS ADMIN SETTINGS ===== */
.abd-analytics-settings .abd-stat-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.abd-stat-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.abd-stat-box:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.abd-stat-box h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.abd-stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

/* ===== ANALYTICS INTEGRATION FOR DASHBOARD LISTINGS ===== */
/* Add analytics row to existing business card structure */
.abd-business-analytics-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.abd-business-analytics {
    margin: 0;
}

.abd-analytics-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.abd-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 55px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #f8f9ff, #e8f0ff);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.abd-stat-item:hover {
    background: linear-gradient(135deg, #e8f0ff, #d8e8ff);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.abd-stat-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
    margin-bottom: 2px;
}

.abd-stat-label {
    font-size: 0.7em;
    color: #666;
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== PRESERVE ORIGINAL STATUS BADGES ===== */
.abd-meta-tag.abd-status-tag {
    background: transparent;
    padding: 0;
    border: none;
}

.abd-meta-tag.abd-status-tag .abd-status-published,
.abd-meta-tag.abd-status-tag .abd-status-pending,
.abd-meta-tag.abd-status-tag .abd-status-draft {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

/* ===== POPULAR BUSINESSES WIDGET ===== */
.abd-popular-businesses {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
}

.abd-popular-businesses h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.abd-popular-businesses h3::before {
    content: "📈";
    font-size: 1.2em;
}

.abd-popular-businesses ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.abd-popular-businesses li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
}

.abd-popular-businesses li:last-child {
    border-bottom: none;
}

.abd-popular-businesses li:hover {
    background: #f8f9fa;
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
    border-radius: 8px;
}

.abd-popular-businesses a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.abd-popular-businesses a:hover {
    color: #667eea;
}

.abd-popular-businesses .views {
    color: #667eea;
    font-size: 0.9em;
    font-weight: 600;
    background: linear-gradient(135deg, #f8f9ff, #e8f0ff);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* ===== BUSINESS VIEWS SHORTCODE DISPLAY ===== */
.abd-business-views-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f8f9ff, #e8f0ff);
    color: #667eea;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.abd-business-views-display .dashicons {
    font-size: 16px;
}

/* ===== NOTIFICATION SYSTEM ===== */
.abd-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    max-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.abd-notification-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-left: 4px solid #1e7e34;
}

.abd-notification-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    border-left: 4px solid #bd2130;
}

.abd-notification-warning {
    background: linear-gradient(135deg, #ffc107, #ffca2c);
    color: #212529;
    border-left: 4px solid #d39e00;
}

/* ===== RESPONSIVE DESIGN FOR ANALYTICS ===== */
@media (max-width: 768px) {
    .abd-analytics-stats {
        justify-content: space-around;
        gap: 10px;
    }
    
    .abd-stat-item {
        min-width: 45px;
        padding: 5px 8px;
    }
    
    .abd-stat-value {
        font-size: 1em;
    }
    
    .abd-stat-label {
        font-size: 0.65em;
    }
    
    .abd-analytics-settings .abd-stat-boxes {
        grid-template-columns: 1fr;
    }
    
    .abd-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .abd-business-analytics-row {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .abd-analytics-stats {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .abd-stat-item {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 12px;
    }
    
    .abd-stat-value,
    .abd-stat-label {
        margin: 0;
    }
}

/* ===== LOADING STATES ===== */
.abd-analytics-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-style: italic;
}

.abd-analytics-loading .dashicons {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== EMPTY STATES ===== */
.abd-analytics-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.abd-analytics-empty .dashicons {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 15px;
}

.abd-analytics-empty h4 {
    margin: 0 0 8px 0;
    color: #495057;
}

.abd-analytics-empty p {
    margin: 0;
    font-size: 0.9em;
}

/* ===== SHORTCODE REFERENCE STYLING ===== */
.abd-shortcode-reference {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.abd-shortcode-reference h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1em;
}

.abd-shortcode-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.abd-shortcode-item:last-child {
    margin-bottom: 0;
}

.abd-shortcode-item h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1em;
}

.abd-shortcode-item p {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 0.9em;
}

.abd-shortcode-code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: #e83e8c;
    display: block;
    margin: 5px 0;
}

.abd-shortcode-params {
    margin-top: 10px;
    font-size: 0.85em;
    color: #6c757d;
}