/**
 * Product Clocking System Styles
 * Styling for article URL toggle functionality
 */

/* Article Badge Styling */
.article-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    animation: pulse-article 2s infinite;
}

/* Pulse animation for article badges */
@keyframes pulse-article {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 4px 8px rgba(59, 130, 246, 0.5);
    }
}

/* Hover effects for article links */
.home-product-card:hover .article-badge {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Admin Meta Box Styling */
.digipro-article-meta-box .form-table th {
    width: 200px;
    padding: 15px 10px 15px 0;
    vertical-align: top;
}

.digipro-article-meta-box .form-table td {
    padding: 15px 10px;
}

.digipro-article-meta-box input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.digipro-article-meta-box input[type="url"] {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.digipro-article-meta-box .description {
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* Visual indicators for clocking status */
.product-clocking-enabled {
    border-left: 4px solid #3b82f6;
}

.product-clocking-disabled {
    border-left: 4px solid #e5e7eb;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .article-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .article-badge i {
        margin-right: 2px;
    }
}

/* External link styling enhancements */
a[target="_blank"] .home-product-card {
    position: relative;
}

a[target="_blank"] .home-product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

a[target="_blank"]:hover .home-product-card::after {
    border-color: #3b82f6;
}

/* Article badge variants */
.article-badge.variant-news {
    background: linear-gradient(135deg, #10b981, #059669);
}

.article-badge.variant-tutorial {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.article-badge.variant-review {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Loading state for clocking toggle */
.clocking-loading {
    opacity: 0.6;
    pointer-events: none;
}

.clocking-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error states */
.clocking-success {
    border-color: #10b981;
    background-color: #f0f9ff;
}

.clocking-error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Article preview tooltip */
.article-preview-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.article-preview-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(0, 0, 0, 0.9);
}

.article-badge:hover .article-preview-tooltip {
    opacity: 1;
    visibility: visible;
} 