/**
 * Enhanced Shortcodes CSS - Themes & Custom Colors
 * Version: 3.7.0
 */

/* Animated Counter */
.ocap-animated-counter {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.ocap-animated-counter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.ocap-animated-counter.ocap-size-small {
    padding: 12px 20px;
    font-size: 14px;
}

.ocap-animated-counter.ocap-size-large {
    padding: 30px 40px;
    font-size: 24px;
}

.ocap-counter-icon {
    font-size: 32px;
}

.ocap-counter-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.ocap-animated-counter.ocap-theme-modern {
    border-radius: 20px;
}

.ocap-animated-counter.ocap-theme-minimal {
    background: transparent !important;
    border: 2px solid currentColor;
}

.ocap-animated-counter.ocap-theme-gradient {
    position: relative;
    overflow: hidden;
}

.ocap-animated-counter.ocap-theme-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Progress Bar */
.ocap-progress-bar-wrapper {
    margin: 20px 0;
}

.ocap-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.ocap-progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.ocap-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.ocap-theme-striped .ocap-progress-fill {
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
}

.ocap-theme-animated .ocap-progress-fill {
    animation: progress-animation 2s linear infinite;
}

@keyframes progress-animation {
    0% { background-position: 0 0; }
    100% { background-position: 40px 0; }
}

/* Chart Wrapper */
.ocap-chart-wrapper {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 20px 0;
}

.ocap-chart-title {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ocap-theme-modern .ocap-chart-wrapper {
    border-radius: 20px;
    border: 1px solid #f0f0f0;
}

/* Popular Posts */
.ocap-popular-posts {
    margin: 20px 0;
}

.ocap-section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid currentColor;
}

.ocap-posts-grid {
    display: grid;
    gap: 20px;
}

.ocap-columns-2 .ocap-posts-grid {
    grid-template-columns: repeat(2, 1fr);
}

.ocap-columns-3 .ocap-posts-grid {
    grid-template-columns: repeat(3, 1fr);
}

.ocap-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.ocap-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.ocap-post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.ocap-post-content {
    padding: 20px;
}

.ocap-post-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    z-index: 1;
}

.ocap-post-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.ocap-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.ocap-post-title a:hover {
    color: #667eea;
}

.ocap-post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
}

.ocap-post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #999;
    margin-top: 10px;
}

.ocap-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ocap-theme-minimal .ocap-post-card {
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.ocap-theme-card .ocap-post-card {
    border-radius: 16px;
}

/* Countries List */
.ocap-countries {
    margin: 20px 0;
}

.ocap-country-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ocap-country-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.ocap-country-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.ocap-country-bar {
    position: relative;
    height: 24px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.ocap-bar-fill {
    height: 100%;
    transition: width 1s ease;
}

.ocap-bar-percentage {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

/* Devices List */
.ocap-devices {
    margin: 20px 0;
}

.ocap-device-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ocap-device-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.ocap-device-icon {
    font-size: 32px;
}

.ocap-device-details {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto 100px auto;
    gap: 12px;
    align-items: center;
}

.ocap-device-name {
    font-weight: 600;
}

.ocap-device-progress {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.ocap-device-progress .ocap-progress-fill {
    height: 100%;
    transition: width 1s ease;
}

/* Traffic Sources */
.ocap-traffic-sources {
    margin: 20px 0;
}

.ocap-source-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ocap-source-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.ocap-source-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ocap-source-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.ocap-source-details {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ocap-source-rank {
    font-weight: 700;
    color: #999;
}

.ocap-source-domain {
    font-weight: 600;
    flex: 1;
}

.ocap-source-count {
    color: #666;
    font-size: 14px;
}

/* Live Feed */
.ocap-live-feed {
    margin: 20px 0;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ocap-live-pulse {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.ocap-feed-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Analytics Card */
.ocap-analytics-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.ocap-analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.ocap-card-icon {
    font-size: 48px;
}

.ocap-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.ocap-card-value {
    font-size: 32px;
    font-weight: 700;
}

.ocap-analytics-card.ocap-theme-outline {
    background: transparent !important;
    border: 2px solid currentColor;
}

.ocap-analytics-card.ocap-theme-shadow {
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* Responsive */
@media (max-width: 768px) {
    .ocap-columns-2 .ocap-posts-grid,
    .ocap-columns-3 .ocap-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .ocap-device-details {
        grid-template-columns: 1fr auto;
    }
    
    .ocap-device-progress,
    .ocap-device-percentage {
        grid-column: 1 / -1;
    }
}

/* Loading State */
.ocap-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.ocap-loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Data State */
.ocap-no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
}
