/* Fix for the WordPress Admin Bar (when a user is logged in) */
body.admin-bar #rpb-progress-bar {
  /* Standard admin bar height on desktop is 32px */
  top: 32px;
}

/*
 * RPB Style: Styling for the progress bar and read time display
 */
/* Progress Bar Container */
#rpb-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%; /* This width is updated by JavaScript */
  height: 5px; /* Default height - overridden by JS inline style */
  /* background-color is set dynamically by JS inline style */
  z-index: 99999;
  transition: width 0.1s linear; /* Smooths the progress bar movement */
}

/* UPDATED STRIPE CSS CLASS - Animation included here by default */
.rpb-striped {
  background-image: linear-gradient(45deg, var(--rpb-stripe-color, #ffffff) 25%, transparent 25%, transparent 50%, var(--rpb-stripe-color, #ffffff) 50%, var(--rpb-stripe-color, #ffffff) 75%, transparent 75%, transparent);
  background-size: 20px 20px;
  /* Animation is now part of the default striped style */
  animation: rpb-stripes-move 0.6s linear infinite;
}

/* NEW CLASS to disable the animation */
.rpb-striped.rpb-no-animation {
  animation: none;
}

/* Animation definition */
@keyframes rpb-stripes-move {
  0% {
    background-position: 20px 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* Mobile Admin Bar Fix */
@media screen and (max-width: 782px) {
  body.admin-bar #rpb-progress-bar {
    /* Mobile admin bar height is 46px */
    top: 46px;
  }
}

/* ==========================================================
   Read Time & Font Resize Button Styles
   ========================================================== */

/* Style for the container div around the read time and buttons */
#rpb-read-time-wrapper {
    display: inline-flex;
    align-items: center;
    /* Pushed further right */
    margin-left: 30px !important; 
    white-space: nowrap; 
}

/* RE-APPLY STYLES FOR READ TIME VALUE */
#rpb-read-time-value {
    color: #555555; 
    /* FIX 1: Added !important to ensure background color is applied */
    background-color: #efefef !important; 
    padding: 2px 5px; 
    border-radius: 3px;
    display: inline-block; 
    font-family: system-ui; 
    font-size: 12px;
    line-height: 1;
    vertical-align: middle;
}

/* CORRECTED BUTTON STYLING (Fixes oblong shape) */
.rpb-font-size-btn {
    /* Button Shape and Position */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    /* FIX: Enforce fixed dimensions to prevent oblong shape */
    width: 20px !important;
    height: 20px !important;
    padding: 0;
    margin-left: 5px;

    /* Visuals */
    font-size: 18px; 
    line-height: 1; 
    
    cursor: pointer;
    /* FIX: Changed aggressive red border to a standard gray */
    border: 1px solid #ccc; 
    background-color: #f9f9f9; 
    border-radius: 50%;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

/* NEW STYLING FOR DASHICON RESET BUTTON (Ensures correct size/centering) */
.rpb-font-size-btn.dashicons-before:before {
    /* Set the font size and line height */
    font-size: 16px !important; 
    line-height: 1; 
    
    width: auto !important;
    height: auto !important;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    padding: 0 !important; 
    margin: 0 !important;
}

/* Hover and Active states */
.rpb-font-size-btn:hover {
    background-color: #eee;
    color: #000;
}

.rpb-font-size-btn:active {
    background-color: #ccc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}