/**
 * Shortcode Styles - Enhanced Analytics Shortcodes
 * @package OneClick_Analytics_Pro
 * @since 3.9.4
 */

/* ================================================
   Counter Widget
   ================================================ */
.ocap-counter-widget {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: var(--counter-bg, #f0f6fc);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ocap-counter-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ocap-counter-widget .ocap-icon {
    font-size: 2em;
}

.ocap-counter-widget .ocap-number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--counter-color, #2271b1);
    line-height: 1;
    margin-bottom: 5px;
}

.ocap-counter-widget .ocap-label {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Counter Sizes */
.ocap-counter-widget.ocap-size-small {
    padding: 12px 18px;
    gap: 10px;
}

.ocap-counter-widget.ocap-size-small .ocap-icon {
    font-size: 1.5em;
}

.ocap-counter-widget.ocap-size-small .ocap-number {
    font-size: 1.8em;
}

.ocap-counter-widget.ocap-size-large {
    padding: 30px 40px;
    gap: 20px;
}

.ocap-counter-widget.ocap-size-large .ocap-icon {
    font-size: 3em;
}

.ocap-counter-widget.ocap-size-large .ocap-number {
    font-size: 3.5em;
}

/* Counter Styles */
.ocap-counter-widget.ocap-style-minimal {
    background: transparent;
    border: 2px solid var(--counter-color, #2271b1);
    box-shadow: none;
}

.ocap-counter-widget.ocap-style-badge {
    border-radius: 50px;
    padding: 12px 25px;
}

.ocap-counter-widget.ocap-style-circle {
    flex-direction: column;
    border-radius: 50%;
    width: 180px;
    height: 180px;
    padding: 20px;
    justify-content: center;
    text-align: center;
}

.ocap-counter-widget.ocap-style-circle .ocap-counter-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Counter Animation */
.ocap-counter-animate .ocap-number {
    animation: ocap-count-up 1s ease-out;
}

@keyframes ocap-count-up {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* ================================================
   Progress Bar Widget
   ================================================ */
.ocap-progress-widget {
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ocap-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ocap-progress-label {
    font-weight: 600;
    color: #333;
}

.ocap-progress-stats {
    font-size: 0.9em;
    color: #666;
}

.ocap-progress-bar {
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.ocap-progress-fill {
    height: 100%;
    background: var(--progress-color, #00a32a);
    border-radius: 12px;
    transition: width 1s ease-out;
    position: relative;
}

.ocap-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: ocap-progress-shine 2s infinite;
}

@keyframes ocap-progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ocap-progress-percentage {
    text-align: right;
    margin-top: 8px;
    font-weight: 600;
    color: var(--progress-color, #00a32a);
}

/* ================================================
   Comparison Widget
   ================================================ */
.ocap-comparison-widget {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 4px solid #2271b1;
}

.ocap-comparison-label {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ocap-comparison-values {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.8em;
    font-weight: 700;
}

.ocap-comparison-separator {
    font-size: 0.6em;
    color: #999;
    font-weight: 400;
}

.ocap-comparison-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.1em;
    font-weight: 600;
}

.ocap-comparison-widget.ocap-trend-up {
    border-left-color: #00a32a;
}

.ocap-comparison-widget.ocap-trend-up .ocap-comparison-trend {
    color: #00a32a;
}

.ocap-comparison-widget.ocap-trend-down {
    border-left-color: #d63638;
}

.ocap-comparison-widget.ocap-trend-down .ocap-comparison-trend {
    color: #d63638;
}

/* ================================================
   Badge Widget
   ================================================ */
.ocap-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--badge-color, #2271b1);
    color: #fff;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ocap-badge-icon {
    font-size: 1.2em;
}

.ocap-badge-count {
    font-weight: 700;
    font-size: 1.1em;
}

.ocap-badge-pulse {
    animation: ocap-badge-pulse 2s infinite;
}

@keyframes ocap-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ================================================
   Ticker Widget
   ================================================ */
.ocap-ticker-widget {
    overflow: hidden;
    background: #2271b1;
    color: #fff;
    padding: 15px 0;
    border-radius: 4px;
}

.ocap-ticker-track {
    display: flex;
    gap: 40px;
    animation: ocap-ticker-scroll 20s linear infinite;
    white-space: nowrap;
}

.ocap-ticker-medium .ocap-ticker-track {
    animation-duration: 20s;
}

.ocap-ticker-slow .ocap-ticker-track {
    animation-duration: 30s;
}

.ocap-ticker-fast .ocap-ticker-track {
    animation-duration: 10s;
}

.ocap-ticker-right .ocap-ticker-track {
    animation-direction: reverse;
}

@keyframes ocap-ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.ocap-ticker-item {
    display: inline-flex;
    gap: 8px;
    padding: 0 20px;
    border-right: 2px solid rgba(255,255,255,0.2);
}

.ocap-ticker-label {
    font-weight: 600;
}

.ocap-ticker-value {
    font-weight: 700;
    font-size: 1.1em;
}

/* ================================================
   Milestone Widget
   ================================================ */
.ocap-milestone-widget {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 2px solid #e5e7eb;
}

.ocap-milestone-icon {
    font-size: 3em;
}

.ocap-milestone-content {
    flex: 1;
}

.ocap-milestone-label {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ocap-milestone-stats {
    color: #666;
    margin-bottom: 10px;
}

.ocap-milestone-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ocap-milestone-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #00a32a);
    border-radius: 6px;
    transition: width 1s ease-out;
}

.ocap-milestone-achieved {
    border-color: #00a32a;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.ocap-milestone-achieved .ocap-milestone-fill {
    background: #00a32a;
}

.ocap-milestone-message {
    margin-top: 10px;
    padding: 10px;
    background: #00a32a;
    color: #fff;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.ocap-celebrate {
    animation: ocap-celebrate 0.6s ease-out;
}

@keyframes ocap-celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ================================================
   Chart Widget
   ================================================ */
.ocap-chart-widget {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 768px) {
    .ocap-counter-widget {
        flex-direction: column;
        text-align: center;
    }
    
    .ocap-comparison-values {
        flex-direction: column;
        gap: 5px;
    }
    
    .ocap-milestone-widget {
        flex-direction: column;
        text-align: center;
    }
}
