/* =========================================
   Font Awesome 7 Loader & Conflict Fixes
   ========================================= */

/* 1. Define where the font files are located */
@font-face {
  font-family: 'Font Awesome 7 Free';
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url('../webfonts/fa-solid-900.woff2') format('woff2');
}

@font-face {
  font-family: 'Font Awesome 7 Free';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../webfonts/fa-regular-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Font Awesome 7 Brands';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../webfonts/fa-brands-400.woff2') format('woff2');
}

/* 2. Force AVC icons to use our specific local font family 
   (Overrides Elementor's Font Awesome 5) */
.advic-icon i, 
.advic-icon .fas, 
.advic-icon .far,
.advic-icon .fa-solid,
.advic-icon .fa-regular {
    font-family: 'Font Awesome 7 Free' !important;
    font-weight: 900; /* Default to Solid */
}

/* Ensure Brands use the Brands font */
.advic-icon .fab,
.advic-icon .fa-brands {
    font-family: 'Font Awesome 7 Brands' !important;
    font-weight: 400;
}

/* =========================================
   General Plugin Styles
   ========================================= */

/* General Wrapper */
.advic-counter-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Grid Layout */
.advic-grid {
    display: grid;
    gap: 15px;
}
.advic-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.advic-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.advic-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    /* Only apply this if specific classes are present (Shortcode usage) */
    .advic-grid.cols-3, .advic-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    /* FIXED: Removed !important so Elementor controls can override this */
    .advic-grid { grid-template-columns: 1fr; }
}

/* Stat Item */
.advic-stat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: transform 0.2s ease;
}
.advic-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.advic-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f7;
    border-radius: 50%;
    margin-right: 15px;
    font-size: 18px;
    color: #4a90e2;
}

.advic-info {
    display: flex;
    flex-direction: column;
}

.advic-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.advic-number {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

/* Live Product Viewers */
.advic-live-product-viewers {
    padding: 10px;
    background: #fff0f0;
    border-left: 3px solid #d63638;
    font-size: 14px;
}

/* Timeline Widget */
.advic-timeline-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.advic-timeline-header {
    margin: 0 0 15px 0;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}
.advic-timeline-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0 10px;
    border-left: 2px solid #e5e7eb;
}
.advic-timeline-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 15px;
}
.advic-timeline-list li:last-child { margin-bottom: 0; }
.advic-timeline-list li:before {
    content: '';
    position: absolute;
    left: -6px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: #4a90e2;
    border-radius: 50%;
    border: 2px solid #fff;
}
.advic-time {
    display: block;
    font-size: 11px;
    color: #999;
    margin-bottom: 3px;
}
.advic-content {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}
.advic-page-ref {
    color: #2271b1;
    font-style: italic;
}

/* =========================================
   Cookie Consent Banner Styles
   ========================================= */

#advic-cookie-banner {
    display: none; /* Hidden by default to prevent flash on cached pages */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #23282d;
    color: #fff;
    padding: 15px 20px;
    box-sizing: border-box;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.advic-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.advic-banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.advic-banner-buttons {
    display: flex;
    gap: 10px;
}

.advic-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.advic-btn:hover {
    opacity: 0.9;
}

.advic-btn-accept {
    background: #2271b1;
    color: #fff;
}

.advic-btn-decline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

/* =========================================
   [FIX] Shortcode Styling Adjustments
   ========================================= */

/* Fix for [advic_counter] Grid Boxes */
/* Ensure the label and number stack vertically and center */
.advic-stat-box.advic-stat-item {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.advic-stat-box .advic-label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.advic-stat-box .advic-value {
    font-size: 24px;
    line-height: 1;
    color: #2271b1; /* WordPress Blue for better visibility */
}

/* Fix for [advic_mini_stat] */
/* Override the default block-flex styles to make it fit inline */
span.advic-mini-stat.advic-stat-item {
    display: inline-flex;
    width: auto;
    padding: 4px 12px;
    margin: 0 5px;
    background: #f0f0f1;
    border: 1px solid #ccc;
    border-radius: 20px; /* Pill shape */
    font-size: 13px;
    line-height: normal;
    vertical-align: middle;
    transform: none; /* Disable hover float effect for mini stats */
}

span.advic-mini-stat.advic-stat-item:hover {
    transform: none;
    box-shadow: none;
    background: #e5e5e5;
}

span.advic-mini-stat .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    color: #555;
}

span.advic-mini-stat .advic-number {
    font-size: 13px; /* Match text size */
    font-weight: 700;
    margin-left: 4px;
    color: #000;
}