/* ==========================================================================
   SweepWidget Component Library
   Unified Tailwind-based component classes
   ========================================================================== */

@layer components {

  /* --- Form Inputs ---
     Replaces: .input-field, .input_field (legacy),
                .sw_input_field (widget), .form_holder inputs
     ========================================================================== */

  /* NOTE: !important ensures specificity over legacy styles */

  .sw-input {
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    color: var(--color-text-primary) !important;
    background-color: #fff !important;
    border: 1px solid var(--color-border-input) !important;
    border-radius: 7px !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    height: auto !important;
    box-shadow: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .sw-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1) !important;
  }

  .sw-select {
    width: 100% !important;
    padding: 10px 40px 10px 16px !important;
    font-size: 15px !important;
    color: var(--color-text-primary) !important;
    background-color: #fff !important;
    border: 1px solid var(--color-border-input) !important;
    border-radius: 7px !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    appearance: none !important;
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    height: auto !important;
    box-shadow: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .sw-select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1) !important;
  }

  .sw-textarea {
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    color: var(--color-text-primary) !important;
    background-color: #fff !important;
    border: 1px solid var(--color-border-input) !important;
    border-radius: 7px !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    min-height: 120px;
    max-height: 400px;
    resize: vertical;
    overflow-y: auto;
    box-shadow: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .sw-textarea:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1) !important;
  }

  .sw-checkbox {
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--color-primary);
  }

  /* --- Dashboard Header Dropdown Links ---
     Used in logged-in header dropdown and mobile nav
     Replaces: .header_nav_inner_link (style.css)
     ========================================================================== */

  .sw-header-dropdown-link {
    width: 100%;
    margin: 0;
    padding: 13px 15px 13px 21px;
    background: #fff;
    color: #555;
    font-size: 15px;
    text-align: left;
    font-weight: 400;
    box-sizing: border-box;
    display: block;
    text-decoration: none;
  }

  .sw-header-dropdown-link:hover {
    background: #f0f4ff;
    opacity: 1;
  }

  /* --- Pricing Plan Cards ---
     Styling moved to Tailwind utilities on elements.
     Remaining rules: button children (PHP-generated), JS-created price spans.
     Class names like pricing_1-4 kept on elements as jQuery hooks.
     ========================================================================== */

  /* Pricing card layout - shared across 4 cards x 6+ files */
  .pricing-card {
    width: 22%;
    overflow: hidden;
    border: 3px solid transparent;
    margin: 20px 1% 0;
    padding: 20px 2% 60px;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 0 7px 0 rgba(230, 230, 230, 1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  /* Pricing signup button children (generated in pricing_header_includes.inc.php) */
  .pricing_signup_button a,
  .pricing_signup_button button {
    width: 90%;
    max-width: 175px;
    margin: 5px auto 30px auto;
    padding: 15px;
    color: #fff;
    font-size: 20px;
    background: #f5a987;
    border: 1px solid #f5a987;
    cursor: pointer;
    outline: none;
    border-radius: 5px;
    display: block;
  }

  .pricing_signup_button a:hover,
  .pricing_signup_button button:hover {
    opacity: 0.8;
  }

  /* JS-created price formatting spans (injected via jQuery .html()) */
  .dollar_sign {
    padding-right: 4px;
    font-size: 18px;
  }

  .month_small {
    padding-left: 5px;
    font-size: 22px;
  }

  .month_small_2 {
    width: 100%;
    margin: 15px 0 0 0;
    color: #777;
    font-size: 17px;
    float: left;
  }

  /* --- Sidebar Nav Links ---
     Used in logged-in sidebar (user_nav_left.inc.php)
     Replaces: .sidebar_left_inner_link, .sidebar_left_inner_link_active (style.css)
     ========================================================================== */

  .sw-sidebar-link {
    width: 100%;
    margin: 0;
    padding: 13px 15px 13px 0;
    color: #444;
    font-size: 15px;
    text-align: left;
    font-weight: 400;
    float: left;
    text-decoration: none;
    display: block;
    transition: all 0.1s ease;
  }

  .sw-sidebar-link:hover {
    padding-right: 10px;
    border-right: 5px solid #4a3aff;
  }

  .sw-sidebar-link-active {
    padding-right: 10px;
    border-right: 5px solid #4a3aff;
  }

  /* --- Marketing Header Nav Links ---
     Used on logged-out pages in header_webflow_template.inc.php
     Replaces: .nav-link + .w-nav-link (Webflow)
     ========================================================================== */

  .sw-nav-link {
    position: relative;
    display: inline-block;
    vertical-align: top;
    text-decoration: none;
    color: #2c3858;
    flex: 0 auto;
    margin-bottom: 20px;
    margin-left: 15px;
    margin-right: 15px;
    padding: 40px 0 20px 0;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    text-align: left;
  }

  .sw-nav-link:hover {
    color: #122d7a;
    box-shadow: inset 0 -5px 0 0 #122d7a;
  }

  /* --- Tooltips ---
     Custom tooltip component
     ========================================================================== */

  .sw-tooltip {
    position: absolute;
    z-index: 999999;
    padding: 6px 12px;
    font-size: 12px;
    color: #fff;
    background-color: #1f2937;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
  }

  .sw-tooltip.active {
    opacity: 1;
  }

  /* --- Alerts / Notices ---
     Replaces: inline-styled notification divs
     ========================================================================== */

  .sw-alert {
    padding: 12px 16px;
    border-radius: 7px;
    font-size: 14px;
    margin-bottom: 16px;
  }
}

/* ==========================================================================
   Admin Layout - Sidebar + Main Content
   Replaces legacy #body_main_right styles overridden by Tailwind preflight
   ========================================================================== */

@layer components {

  #body_main_right {
    width: calc(100% - 285px);
    padding-top: 90px;
    padding-left: 30px;
    margin-left: 250px;
    float: left;
  }

  #body_main_right_inner {
    clear: both;
  }

  #body_main_right_inner_below {
    clear: both;
  }

  @media (max-width: 1000px) {
    #sidebar_left,
    #sidebar_left #user_sites_select_wrapper {
      display: none !important;
    }

    #body_main_right {
      width: 100%;
      padding-top: 80px;
      padding-left: 30px;
      padding-right: 30px;
      margin: 0 !important;
      box-sizing: border-box;
      float: left;
    }

    #body_main_right_inner {
      clear: both;
      padding: 5px 0 20px 0;
    }
  }
}

/* ==========================================================================
   Brand Selector (sidebar + mobile)
   ========================================================================== */

@layer components {
  .sw_brand_select {
    width: 100%;
    height: 42px;
    padding: 0 32px 0 14px;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 500;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234a3aff' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    display: block;
    box-sizing: border-box;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .sw_brand_select:hover {
    border-color: #bbb;
  }

  .sw_brand_select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1);
  }
}

/* ==========================================================================
   Mobile Header Components (max-width: 1000px)
   Replaces legacy mobile styles overridden by Tailwind preflight
   ========================================================================== */

@layer components {

  /* Mobile hamburger - hidden on desktop */
  #sw_mobile_hamburger {
    display: none;
  }

  @media (max-width: 1000px) {

    /* Hide desktop elements */
    #header_links_main_profile_desktop_wrapper {
      display: none;
    }

    /* Mobile hamburger button */
    #sw_mobile_hamburger {
      display: flex !important;
      align-items: center;
      justify-content: center;
      position: fixed;
      top: 10px;
      right: 16px;
      width: 40px;
      height: 40px;
      padding: 0;
      background: none;
      border: 2px solid var(--color-border);
      border-radius: 8px;
      color: var(--color-primary);
      font-size: 20px;
      cursor: pointer;
      z-index: 100001;
      outline: none;
      -webkit-tap-highlight-color: transparent;
    }

    #sw_mobile_hamburger:hover,
    #sw_mobile_hamburger:active {
      background: var(--color-primary-lightest);
      border-color: var(--color-primary);
    }

    /* Mobile brand bar (fixed below header) */
    #sw_mobile_brand_bar {
      display: block !important;
      width: 100%;
      padding: 10px 20px;
      position: fixed;
      top: 58px;
      left: 0;
      background: var(--color-bg-lighter);
      border-bottom: 1px solid var(--color-border-gray);
      z-index: 99998;
      box-sizing: border-box;
      text-align: center;
    }

    #sw_mobile_brand_bar .sw_brand_select {
      max-width: 300px;
      margin: 0 auto;
    }

  }

  /* Logged-out hamburger - hidden on desktop, shown on mobile */
  .sw_mobile_hamburger_out {
    display: none;
  }

  @media (max-width: 1000px) {
    .sw_mobile_hamburger_out {
      display: flex !important;
      align-items: center;
      justify-content: center;
      position: fixed;
      top: 10px;
      right: 16px;
      width: 40px;
      height: 40px;
      padding: 0;
      background: none;
      border: 2px solid var(--color-border);
      border-radius: 8px;
      color: var(--color-primary);
      font-size: 20px;
      cursor: pointer;
      z-index: 100001;
      outline: none;
      -webkit-tap-highlight-color: transparent;
    }
  }
}

/* ==========================================================================
   Build / Edit Widget Page
   Comprehensive styles for the giveaway builder and photo contest builder.
   Migrated from @layer legacy to override Tailwind preflight resets.
   ========================================================================== */

@layer components {

  /* Form field add (gray) - dynamically applied by JS */
  .form_field_add {
    padding: 5px 10px;
    background: #f0f0f0;
    color: #444;
    border: 2px solid #f0f0f0;
    border-radius: 7px;
  }

  /* =================================================================
     2. Fixed Bottom Bar
     ================================================================= */

  .build_widget_submit_fixed_wrapper {
    position: fixed;
    bottom: 0;
    text-align: center;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    padding: 0;
    backdrop-filter: blur(8px);
  }

  #widget_form {
    padding-bottom: 100px;
  }

  /* =================================================================
     3. Form Inputs & Selects
     ================================================================= */

  .text_input_white,
  .text_input_white_4,
  .text_input,
  .sw_text_input {
    width: 100%;
    padding: 12px 15px;
    color: var(--color-text-primary);
    font-size: 14px;
    text-align: left;
    background: #fff;
    border: 1px solid #c4c4c4;
    border-radius: 7px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
  }

  .text_input_white:focus,
  .text_input_white_4:focus,
  .text_input:focus,
  .sw_text_input:focus {
    border-color: var(--color-primary);
  }

  .text_input_white_4 {
    padding: 10px 5px;
  }

  /* Auto-style all form inputs site-wide (safety net for elements without explicit classes).
     Tailwind v4 preflight sets border-width:0 on *, so any input without a class gets no border.
     These scoped rules restore borders for all text-type inputs, selects, and textareas
     within the main page containers. Uses :is() to avoid repeating selectors 4x. */
  :is(#body_main_right, #body_main_right_wide, #body_right, #payment_form_stripe)
  :is(input[type="text"], input[type="number"], input[type="email"], input[type="date"],
      input[type="time"], input[type="url"], input[type="search"], input[type="password"],
      textarea, select) {
    border: 1px solid #c4c4c4;
    border-radius: 7px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--color-text-primary);
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
  }

  :is(#body_main_right, #body_main_right_wide, #body_right, #payment_form_stripe)
  :is(input[type="text"], input[type="number"], input[type="email"], input[type="date"],
      input[type="time"], input[type="url"], input[type="search"], input[type="password"],
      textarea, select):focus {
    border-color: var(--color-primary);
  }

  .entry_input,
  .entry_input_2 {
    width: 100%;
    height: 50px;
    padding: 15px 0 15px 15px;
    color: #444;
    font-size: 14px;
    background: #fff;
    border: 1px solid #c4c4c4;
    border-radius: 7px;
    outline: none;
    box-sizing: border-box;
  }

  .entry_input:focus,
  .entry_input_2:focus {
    border-color: var(--color-primary);
  }

  /* Select dropdowns */
  .sw_select_full_white {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    font-size: 15px;
    text-align: left;
    background-color: #fff;
    border: 1px solid #c4c4c4;
    border-radius: 7px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
  }

  .sw_select_full_white:focus {
    border-color: var(--color-primary);
  }

  /* =================================================================
     4. Layout Containers (margin/spacing restoration)
     ================================================================= */

  .full_width_show {
    width: 100%;
    margin: 0 0 20px 0;
    float: left;
  }

  .full_width_hidden {
    width: 100%;
    margin: 0;
    float: left;
    display: none;
  }

  /* Input holders */
  .input_holder_full {
    width: 98%;
    margin: 10px 1%;
    float: left;
  }

  .form_holder_l {
    width: 48%;
    margin: 0 2% 20px 0;
    font-size: 14px;
    float: left;
  }

  .form_holder_r {
    width: 48%;
    margin: 0 0 20px 2%;
    font-size: 14px;
    float: left;
  }

  @media (max-width: 800px) {
    .form_holder_l,
    .form_holder_r {
      width: 100%;
      margin: 0 0 20px 0;
    }

    .input_holder_full {
      width: 100%;
      margin: 0;
    }
  }

  /* =================================================================
     5. Section Labels & Headers
     ================================================================= */

  /* Build widget tab content panel */
  .build_widget_inner {
    width: 100%;
    padding: 0 20px 25px 20px;
    background: #fff;
    box-sizing: border-box;
    border-radius: 0 0 10px 10px;
    display: none;
    float: left;
  }

  /* Card base for build widget content areas */
  .card {
    margin-top: 0;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 0 5px 0 #eee;
    float: left;
    cursor: default;
  }

  .card .card-content {
    padding: 15px 20px 20px 20px;
  }

  .card .card-content .card-title {
    font-size: 18px;
  }

  /* h3 headings in build widget (Tailwind preflight resets font-size/weight) */
  .build_widget_inner h3 {
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
    margin-bottom: 15px;
    color: #444;
  }

  /* =================================================================
     6. Entry Methods
     ================================================================= */

  /* Entry method containers */
  .entry_method_each,
  .unlock_rewards_each {
    width: 100%;
    margin: 0 0 16px 0;
    padding: 0;
    background: #fff;
    border-radius: 10px;
    position: relative;
    z-index: 900;
  }

  .unlock_rewards_each {
    margin: 16px 0 0 0;
  }

  .entry_method_each_body {
    width: 100%;
    color: #444;
    font-size: 14px;
    padding: 0;
    /* overflow: hidden; */
  }

  /* Entry method / unlock rewards body inner (form area) */
  .entry_method_body_inner,
  .unlock_rewards_body_inner {
    width: 100%;
    margin: 0;
    padding: 16px 20px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-sizing: border-box;
    overflow: hidden;
  }

  /* Drag handle bars */
  .handle,
  .unlock_rewards_each_handle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 11px 20px;
    padding-right: 90px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: #bbb;
    border-radius: 10px;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
  }

  /* Flat bottom corners when entry method is expanded */
  .handle[data-toggle="expand"],
  .unlock_rewards_each_handle[data-toggle="expand"] {
    border-radius: 10px 10px 0 0;
  }

  .handle:hover,
  .unlock_rewards_each_handle:hover {
    cursor: move;
    filter: brightness(1.05);
  }

  .handle_inner {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
  }

  /* Drag icon spacing */
  .entry_method_drag_icon {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    opacity: 0.85;
  }

  /* Delete/Remove buttons on handles */
  .delete,
  .unlock_rewards_delete {
    top: 8px;
    right: 10px;
    padding: 4px 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    transition: all 0.2s ease;
    position: absolute;
    background: transparent;
    white-space: nowrap;
    line-height: 1.4;
  }

  .delete:hover,
  .unlock_rewards_delete:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #444;
    border-color: transparent;
  }

  /* Hide drag icon on mobile */
  @media (max-width: 768px) {
    .entry_method_drag_icon {
      display: none;
    }
  }

  .entry_group_handle_delete {
    margin-right: -15px;
    color: #888;
    font-weight: bold;
    font-size: 24px;
    cursor: pointer;
    float: right;
    z-index: 1000;
  }

  /* Entry method add buttons (within entry group popover) */
  .entry_method_add_style {
    margin: 0 10px 10px 0;
    padding: 5px 10px;
    color: #fff;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.3s ease;
    float: left;
    border: none;
  }

  .entry_method_add_style:hover {
    opacity: 0.8;
  }

  .entry_group_button,
  .entry_method_add {
    padding: 5px 10px;
    color: #fff;
    border: none;
    border-radius: 7px;
    cursor: pointer;
  }

  /* Plan-level disallow styling */
  .entry_method_add_disallow_pro:hover,
  .entry_method_add_disallow_business:hover,
  .entry_method_add_disallow_premium:hover,
  .entry_method_add_disallow_enterprise:hover {
    opacity: 0.8;
    transition: all 0.5s ease;
  }

  .entry_method_instructions,
  .sw_entry_method_handle_hint {
    width: 100%;
    margin: 0;
    color: #777;
    font-size: 12px;
    font-weight: 300;
    line-height: 20px;
    float: left;
  }

  .sw_entry_method_handle_hint {
    font-style: normal;
  }

  /* Icon preview circle (in entry method body) */
  .entry_method_body_inner .entry_icon_path_display {
    width: 40px;
    min-height: 40px;
    margin: 0;
    color: #fff;
    font-size: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Native color picker input */
  .sw-color-picker {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.15s ease;
  }

  .sw-color-picker:hover {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .sw-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
  }

  .sw-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
  }

  .sw-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 8px;
  }

  /* Icon color + picker inline row */
  .sw-icon-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease;
  }

  .sw-icon-color-row:hover {
    border-color: #d1d5db;
  }

  .sw-icon-color-row .sw-color-picker-label {
    font-size: 13px;
    color: #6b7280;
    flex: 1;
  }

  /* Custom icon search & grid */
  .entry_method_body_inner .custom_icons_wrapper {
    margin: 4px 0 0 0;
  }

  .entry_method_body_inner .custom_icons_wrapper_search_wrapper {
    width: 100%;
  }

  .entry_method_body_inner .custom_icons_wrapper_search {
    padding: 10px 12px !important;
    font-size: 13px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
  }

  .entry_method_body_inner .custom_icons_wrapper_inner {
    margin: 8px 0 0 0;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-height: 160px;
  }

  .entry_method_body_inner .custom_icons_wrapper_inner i {
    width: 40px;
    margin: 4px;
    font-size: 22px;
  }

  .entry_method_body_inner .entry_input,
  .entry_method_body_inner .entry_input_2,
  .unlock_rewards_body_inner .entry_input,
  .unlock_rewards_body_inner .entry_input_2 {
    width: 100%;
    height: 44px;
    padding: 10px 12px;
    color: #374151;
    font-size: 14px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
  }

  .entry_method_body_inner .entry_input:focus,
  .entry_method_body_inner .entry_input_2:focus,
  .unlock_rewards_body_inner .entry_input:focus,
  .unlock_rewards_body_inner .entry_input_2:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.15);
  }

  .entry_method_body_inner .sw-textarea,
  .unlock_rewards_body_inner .sw-textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.15s ease;
  }

  .entry_method_body_inner .sw-textarea:focus,
  .unlock_rewards_body_inner .sw-textarea:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.15);
  }

  /* Input holder layout inside entry methods */
  .entry_method_body_inner .input_holder_1,
  .unlock_rewards_body_inner .input_holder_1 {
    width: 48%;
    margin: 0 1%;
    float: left;
  }

  .entry_method_body_inner .input_holder_full,
  .unlock_rewards_body_inner .input_holder_full {
    width: 100%;
    margin: 0;
    float: left;
  }

  /* Checkbox and option rows inside entry methods */
  .entry_method_body_inner .full_width_no_margin,
  .unlock_rewards_body_inner .full_width_no_margin {
    padding: 4px 0;
  }

  .entry_method_body_inner .full_width_margin_1,
  .unlock_rewards_body_inner .full_width_margin_1 {
    margin-top: 0;
  }

  /* Fix input_header_2 used in checkbox labels */
  .entry_method_body_inner .input_header_2,
  .unlock_rewards_body_inner .input_header_2 {
    font-size: 14px;
    font-weight: 500;
    float: none;
    display: inline;
  }

  /* Tooltip question marks inside entry methods */
  .entry_method_body_inner .tooltip_question_mark {
    margin-left: 6px;
    opacity: 0.7;
    transition: opacity 0.15s ease;
  }

  .entry_method_body_inner .tooltip_question_mark:hover {
    opacity: 1;
  }

  /* Select elements inside entry methods */
  .entry_method_body_inner select,
  .unlock_rewards_body_inner select {
    width: 100%;
    height: 44px;
    padding: 10px 12px;
    color: #374151;
    font-size: 14px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
  }

  .entry_method_body_inner select:focus,
  .unlock_rewards_body_inner select:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.15);
  }

  /* Hint text below inputs */
  .entry_method_body_inner .sw_entry_method_handle_hint,
  .unlock_rewards_body_inner .sw_entry_method_handle_hint {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
  }

  /* Daily/timer select holder headers */
  .entry_method_body_inner .daily_select_holder_header,
  .entry_method_body_inner .timer_select_holder_header {
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
  }

  /* Viral share sharing option checkboxes */
  .entry_method_body_inner .viral_share_options_holder_each_text {
    margin-left: 6px;
  }

  /* Error box */
  .entry_method_error_box {
    width: 100%;
    margin: 12px 0 0 0;
    padding: 12px 16px;
    color: #b91c1c;
    font-size: 13px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    box-sizing: border-box;
    display: none;
  }

  .entry_method_error_box li {
    width: 100%;
    margin-bottom: 4px;
  }

  /* Entry group section headers */
  .entry_group_handle {
    width: 100%;
    padding: 8px 20px;
    margin: 12px 0 0 0;
    font-size: 15px;
    font-weight: 600;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
    cursor: all-scroll;
    box-sizing: border-box;
  }

  .entry_group_each {
    width: 100%;
    clear: both;
  }

  .entry_group_handle_text {
    margin: 4px 0 0 0;
    font-size: 14px;
    font-weight: normal;
    color: #6b7280;
  }

  .entry_group_placeholder {
    width: 100%;
    height: 56px;
    margin: 8px 0;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    visibility: visible !important;
    clear: both;
  }

  /* Responsive: stack form fields on mobile */
  @media (max-width: 768px) {
    .entry_method_body_inner .input_holder_1,
    .unlock_rewards_body_inner .input_holder_1 {
      width: 100%;
      margin: 0;
    }

    .entry_method_body_inner,
    .unlock_rewards_body_inner {
      padding: 12px 14px 16px;
    }

    .handle,
    .unlock_rewards_each_handle {
      padding: 10px 14px;
      padding-right: 80px;
      font-size: 14px;
    }
  }

  /* =================================================================
     7. Entry Group Popover (Add Entry Method modal)
     ================================================================= */

  .entry_group_hide,
  .entry_group_hide_entry_methods {
    margin: 75px 0 20px 0;
    padding: 20px 3% 15px 3%;
    background: #fff;
    box-shadow: 0px 0px 5px 0px #eee;
    border: 1px solid #eee;
    border-radius: 8px;
    box-sizing: border-box;
    position: absolute;
    display: none;
    z-index: 998;
  }

  #entry_methods_top_entry_group,
  #custom_fields_top_entry_group {
    margin-top: 120px;
    z-index: 99999;
  }

  .entry_group_top {
    width: 100%;
    float: left;
  }

  .entry_group_header {
    width: 88%;
    margin: 0 0 19px 0;
    font-size: 18px;
    font-weight: bold;
    text-align: left;
    line-height: 25px;
    float: left;
  }

  .entry_group_description {
    width: 100%;
    margin: 0 0 25px 0;
    font-size: 15px;
    font-weight: normal;
    float: left;
  }

  .entry_group_exit {
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    color: #999;
  }

  .entry_group_exit:hover {
    color: #444;
  }

  /* Prize winners count - dynamic class toggled by jQuery */
  .sw-prize-winners-count.over-limit {
    color: #ef4444;
    font-weight: 600;
  }

  /* =================================================================
     10. Help Icons & Plan Badges
     ================================================================= */

  .paid_plan_tip {
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 400;
    font-style: normal;
    display: inline-block;
  }

  .pro_lock_icon_wrapper,
  .business_lock_icon_wrapper {
    margin: -0.5px 0 0 18px;
    padding: 0 0 0 10px;
    font-size: 14px;
    float: right;
  }

  /* =================================================================
     11. File Upload & Image Preview
     ================================================================= */

  .fileUpload {
    position: relative;
    overflow: hidden;
    display: inline-block;
    vertical-align: top;
  }

  .fileUpload input.upload {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    padding: 0;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    display: none;
  }

  .image_upload_wrapper {
    width: 100%;
    margin: 15px 0 0 0;
    float: left;
  }

  .remove_image {
    margin-top: -10px;
    margin-left: -10px;
    font-size: 20px;
    cursor: pointer;
    background: #fff;
    border-radius: 50px;
    position: absolute;
    z-index: 2;
    color: #e02f58;
  }

  .user_upload_image_radio_labels_wrapper {
    width: 100%;
    margin: 0;
    float: left;
  }

  /* =================================================================
     12. Error Messages
     ================================================================= */

  .error_holder_javascript {
    width: 100%;
    margin: 0 0 30px 0;
    padding: 20px 30px;
    color: #ff0000;
    font-weight: bold;
    font-size: 16px;
    line-height: 24px;
    border-radius: 7px;
    box-sizing: border-box;
    float: left;
  }

  /* =================================================================
     14. Update Widget Info Banner
     ================================================================= */

  .copy_giveaway_wrapper {
    width: 100%;
    margin: 15px 0 5px 0;
    padding: 0;
    float: left;
  }

  /* =================================================================
     15. Official Rules Generator
     ================================================================= */

  #official_rules_generator_wrapper {
    width: 100%;
    margin: 0 0 5px 0;
    padding: 25px;
    background: #f8f8f8;
    border-radius: 7px;
    box-sizing: border-box;
    display: none;
    float: left;
  }

  /* =================================================================
     16. Mobile Responsive (Build Widget)
     ================================================================= */

  @media (max-width: 1000px) {
    .half_holder,
    .half_holder_1,
    .half_holder_2 {
      width: 100%;
      float: left;
    }

    .form_holder_l,
    .form_holder_r {
      width: 94%;
      margin: 0 3% 15px 3%;
      font-size: 14px;
      float: left;
    }

    .copy_giveaway_wrapper {
      margin: 10px 0 0 0;
    }
  }


  /* =================================================================
     17. Build Widget Page Layout (kept: active state, mobile select, mobile overrides)
     ================================================================= */

  .vertical-nav li.active a {
    color: #fff;
    background: var(--color-primary);
  }

  @media (max-width: 768px) {
    #sw_mobile_tab_select {
      width: 100%;
      padding: 10px 40px;
      font-size: 14px;
      text-align: center;
      font-weight: 500;
      font-family: Rubik, sans-serif;
      color: var(--color-primary);
      background: #fff;
      border: 1.5px solid var(--color-primary);
      border-radius: 8px;
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      cursor: pointer;
      outline: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234a3aff' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      background-size: 12px;
    }

    #sw_mobile_tab_select:focus {
      border-color: var(--color-primary);
      box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.15);
    }

    .copy_giveaway_wrapper {
      margin: 0 0 10px 0;
    }

    .copy_giveaway_wrapper > div {
      font-size: 13px !important;
      margin: 5px 0 10px 0 !important;
    }

    .copy_giveaway_wrapper #how_to_build {
      font-size: 13px;
      padding: 6px 12px;
    }

    .card {
      padding: 20px;
      box-shadow: none;
    }
  }
}

/* ==========================================================================
   Marketing Component Responsive Overrides
   ========================================================================== */

@layer components {
  @media (max-width: 1023px) {
    .sw-nav-link {
      display: block;
      width: 100%;
      padding: 12px 16px;
      margin: 0;
      text-align: left;
      font-size: 15px;
      color: #2c3858;
      border-radius: 8px;
      transition: background 0.15s;
    }
    .sw-nav-link:hover {
      box-shadow: none;
      background: #f5f3ff;
      color: #4a3aff;
    }
  }

}

/* ==========================================================================
   Pricing Responsive Overrides (most moved to Tailwind utilities on elements)
   ========================================================================== */

@layer components {
  /* Pricing card responsive */
  @media (max-width: 840px) {
    .pricing-card {
      width: 90%;
      height: auto;
      margin: 10px 5%;
      padding: 20px 5% 30px;
      border: none;
      position: relative;
      float: left;
      box-shadow: 0 0 7px 0 rgba(230, 230, 230, 1);
    }
  }

  @media (max-width: 800px) {
    .build_widget_inner {
      padding: 15px;
    }
  }

  @media (max-width: 760px) {
    .pricing_signup_button a,
    .pricing_signup_button button {
      padding: 14px 5%;
      font-size: 16px;
    }
  }

  @media (max-width: 480px) {
    .pricing-card {
      width: 94%;
      margin-left: 3%;
      margin-right: 3%;
    }
  }

  @media (max-width: 1000px) {
    #pricing_wrapper_inner {
      width: 100%;
      margin: auto;
    }
  }
}

/* ==========================================================================
   Photo Contest Tool Demo (photo_contest_tool.inc.php)
   ========================================================================== */

#upload-demo-area:hover {
  border-color: #4338ca;
  background: #eef2ff;
  transform: scale(1.01);
}

.approve-btn-demo:hover {
  background: #38a169;
  transform: scale(1.05);
}

.reject-btn-demo:hover {
  background: #e53e3e;
  transform: scale(1.05);
}

.approval-demo-item {
  transition: all 0.3s ease;
}

@media (max-width: 991px) {
  .approval-demo-item {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================


/* ==========================================================================
   Homepage: Logo Slider + Testimonial Carousel (homepage.inc.php)
   ========================================================================== */

@layer components {
  .logo_component-slider {
    display: flex !important;
    width: max-content !important;
    animation: scrollLogos 40s linear infinite !important;
    will-change: transform;
    box-sizing: border-box;
    gap: 6rem;
    flex-flow: row;
    justify-content: flex-start;
    align-items: center;
  }

  .sw-testimonial-track {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 20px 0;
  }

  .sw-testimonial-track::-webkit-scrollbar {
    display: none;
  }

  .sw-testimonial-card {
    scroll-snap-align: start;
    flex: 0 0 390px;
    max-width: 390px;
  }

  @media screen and (max-width: 991px) {
    .logo_component-slider {
      animation: scrollLogos 35s linear infinite !important;
      gap: 3rem;
    }
  }

  @media screen and (max-width: 767px) {
    .logo_component-slider {
      animation: scrollLogos 30s linear infinite !important;
    }
  }

  @media screen and (max-width: 479px) {
    .logo_component-slider {
      animation: scrollLogos 25s linear infinite !important;
      gap: 2rem;
    }

    .sw-testimonial-card {
      flex: 0 0 85vw;
      max-width: 85vw;
    }
  }
}

@keyframes scrollLogos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Example Pages: H1 heading (template/examples/*.inc.php)
   ========================================================================== */

.example_each_h1 {
  width: 100%;
  margin: 50px 0 10px 0;
  color: #4a3aff;
  font-size: 36px;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  float: left;
}

@media (max-width: 800px) {
  .example_each_h1 {
    font-size: 28px;
  }
}

@media (max-width: 479px) {
  .example_each_h1 {
    font-size: 24px;
  }
}

/* ==========================================================================
   Form Components
   Custom checkbox, radio, textarea, and form field styling.
   ========================================================================== */

/* Checkboxes: .sw-checkbox custom styled checkbox */
[type="checkbox"].sw-checkbox:not(:checked) + span:not(.lever)::before,
[type="checkbox"].sw-checkbox:checked + span:not(.lever)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border: 2px solid #5a5a5a;
  border-radius: 3px;
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}

[type="checkbox"].sw-checkbox:checked + span:not(.lever)::before {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

[type="checkbox"].sw-checkbox:checked + span:not(.lever)::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

[type="checkbox"].sw-checkbox + span:not(.lever) {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  display: inline-block;
  height: 25px;
  line-height: 25px;
  user-select: none;
}

[type="checkbox"].sw-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  border: 0;
  width: 0;
  height: 0;
}

/* Radio buttons: .sw-radio custom styled radio */
[type="radio"].sw-radio:not(:checked) + span::before,
[type="radio"].sw-radio:checked + span::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 0;
  width: 16px;
  height: 16px;
  border: 2px solid #5a5a5a;
  border-radius: 50%;
  background: transparent;
  transition: border-color 0.15s;
}

[type="radio"].sw-radio:checked + span::before {
  border-color: var(--color-primary);
}

[type="radio"].sw-radio:checked + span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary);
}

[type="radio"].sw-radio + span {
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  display: inline-block;
  height: 25px;
  line-height: 25px;
  user-select: none;
}

[type="radio"].sw-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Textarea: .sw-textarea styling */
textarea.sw-textarea {
  width: 100%;
  padding: 10px 16px;
  font-size: 15px;
  color: var(--color-text-primary);
  background-color: #fff;
  border: 1px solid var(--color-border-input);
  border-radius: 7px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 80px;
  resize: vertical;
  overflow-y: auto;
  box-sizing: border-box;
}

textarea.sw-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1);
}

/* Ensure native selects are visible */
select {
  display: block !important;
}


/* Toggle Switch */
.switch label {
  cursor: pointer;
}

.switch label input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch label .lever {
  content: '';
  display: inline-block;
  position: relative;
  width: 40px;
  height: 15px;
  background-color: #818181;
  border-radius: 15px;
  margin: 0 10px;
  transition: background 0.3s ease;
  vertical-align: middle;
}

.switch label .lever::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -1px;
  width: 21px;
  height: 21px;
  background-color: #f1f1f1;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: left 0.3s ease, background 0.3s ease;
}

.switch label input[type="checkbox"]:checked + .lever {
  background-color: rgba(74, 58, 255, 0.4);
}

.switch label input[type="checkbox"]:checked + .lever::after {
  left: 20px;
  background-color: var(--color-primary);
}

/* Collection / tabs (used minimally) */
.tabs {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--color-border-gray);
}

.tabs .tab {
  flex: 1;
  text-align: center;
}

.tabs .tab a {
  display: block;
  padding: 10px 16px;
  color: var(--color-text-primary);
  font-size: 15px;
  text-transform: none;
  text-decoration: none;
  transition: color 0.2s;
}

.tabs .tab a.active {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

/* Accordion (details/summary replacement for jQuery UI accordion) */
.sw-accordion-item {
  margin-bottom: 10px;
  border: 1px solid #eee;
  background: #fff;
}

.sw-accordion-header {
  display: block;
  cursor: pointer;
  padding: 10px 2%;
  color: #444;
  font-size: 100%;
  list-style: none;
}

.sw-accordion-header::-webkit-details-marker {
  display: none;
}

.sw-accordion-content {
  padding: 0 2% 10px;
  color: #444;
  line-height: 26px;
}


/* ==========================================================================
   Reporting Pages
   Promoted from @layer legacy to override Tailwind preflight resets.
   Covers: entries, winners, user/action, downloads, earned coupons pages.
   ========================================================================== */

@layer components {

  /* --- Actions holder (button toolbar) --- */

  #actions_holder {
    width: 100%;
    margin: 10px 0 0 0;
    padding: 15px 0 5px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  /* --- Reporting action buttons --- */
  .sw-report-btn {
    padding: 9px 24px;
    font-size: 15px;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-block;
    text-decoration: none;
  }

  .sw-report-btn:hover { opacity: 0.7; }

  .sw-report-btn-primary {
    color: #fff;
    background: #4a3aff;
    border: 1px solid #4a3aff;
  }

  .sw-report-btn-winners {
    color: #fff;
    background: #F5A886;
    border: 1px solid #F5A886;
  }

  .sw-report-btn-outline {
    color: #4a3aff;
    background: #fff;
    border: 1px solid #4a3aff;
  }

  .sw-report-btn-danger {
    color: #d32f2f;
    background: #fff;
    border: 1px solid #d32f2f;
  }

  /* Export/data row - visual separator below action buttons */
  .reporting-export-row {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 1px solid #eee;
  }


  /* --- Expandable panels (picker, export, upload, whitelist, blacklist) --- */

  #reporting_top_row_links_wrapper_hide,
  #competition_reporting_pick_a_winner_all_wrapper,
  #competition_reporting_add_entries_wrapper,
  #upload_entries_button_wrapper,
  #competition_reporting_export_data_wrapper,
  #user_reporting_entry_methods_wrapper,
  #competition_reporting_pick_a_winner_entries_wrapper,
  #competition_reporting_pick_a_winner_user_wrapper {
    flex-basis: 100%;
    width: 100%;
    margin: 12px 0 8px 0;
    padding: 20px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 15px;
    box-sizing: border-box;
    display: none;
  }

  #competition_reporting_pick_a_winner_random_options_wrapper,
  #competition_reporting_pick_a_winner_manual_options_wrapper {
    width: 100%;
    margin: 10px 0 0 0;
    background: #fff;
    float: left;
    display: none;
  }


  /* --- Sort button --- */

  #reporting_top_row_links_show_hide_button,
  #sort_by_submit {
    margin-right: 15px;
    padding: 5px 15px;
    color: #fff;
    font-size: 15px;
    text-align: center;
    background: #4a3aff;
    border: 1px solid #4a3aff;
    border-radius: 7px;
    outline: none;
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s ease-in-out;
    float: left;
  }

  #reporting_top_row_links_show_hide_button:hover,
  #sort_by_submit:hover {
    opacity: 0.7;
  }


  /* --- Stats cards container --- */

  #competition_table_above {
    width: 100%;
    max-width: 600px;
    margin: 15px 0 10px 0;
    font-size: 16px;
    text-align: center;
    display: inline-block;
  }


  /* --- HTML tables (#report_table, table.highlight) --- */

  #report_table,
  table.highlight {
    width: 100%;
    border-collapse: collapse;
  }

  #report_table thead th,
  table.highlight th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 2px solid #d1d5db;
  }

  #report_table tbody tr,
  table.highlight tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.15s;
  }

  #report_table tbody tr:hover,
  table.highlight tbody tr:hover {
    background: #f9fafb;
  }

  #report_table tbody td,
  table.highlight td {
    padding: 12px 16px;
    font-size: 13px;
    vertical-align: top;
  }

  #report_table tbody td a,
  table.highlight td a {
    color: #4a3aff;
  }


  /* --- Reporting data table (float-based layout) --- */

  .competition_reporting {
    width: 100%;
    margin: 2px 0 10px 0;
    font-size: 13px;
    overflow-wrap: break-word;
    float: left;
  }

  .competition_reporting table {
    min-width: 900px;
    border-spacing: 0;
    float: left;
  }

  .competition_reporting th {
    height: 40px;
    border-top: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    background: #f9fafb;
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
  }

  .competition_reporting tr {
    width: 100%;
    text-align: left;
    float: left;
  }

  .entry_row_each {
    background: #fff;
    transition: background 0.15s;
  }

  .entry_row_each:hover {
    background: #f9fafb;
  }

  .entry_row_each a {
    color: #4a3aff;
    text-decoration: underline;
  }

  /* Column widths (float-based table layout) - consolidated with :is() */
  :is(.competition_reporting_1, .competition_reporting_1_2,
      .competition_reporting_2, .competition_reporting_2_2,
      .competition_reporting_3, .competition_reporting_3_2,
      .competition_reporting_4, .competition_reporting_4_2,
      .competition_reporting_5, .competition_reporting_5_2) {
    box-sizing: border-box;
    float: left;
    overflow: hidden;
    padding: 15px 1% 10px 1%;
    text-align: left;
  }

  /* Header row cells */
  :is(.competition_reporting_1, .competition_reporting_2,
      .competition_reporting_3, .competition_reporting_4,
      .competition_reporting_5) {
    height: 19px;
  }

  /* Data row cells */
  :is(.competition_reporting_1_2, .competition_reporting_2_2,
      .competition_reporting_3_2, .competition_reporting_4_2,
      .competition_reporting_5_2) {
    height: 120px;
    border-right: 1px solid #d1d5db;
    border-bottom: 1px solid #e5e7eb;
  }

  /* Per-column widths */
  .competition_reporting_1, .competition_reporting_1_2 { width: 6%; text-align: center; }
  .competition_reporting_2, .competition_reporting_2_2 { width: 18%; }
  .competition_reporting_3, .competition_reporting_3_2 { width: 9%; }
  .competition_reporting_4, .competition_reporting_4_2 { width: 14%; }
  .competition_reporting_5, .competition_reporting_5_2 { width: 22%; }

  /* Column-specific overrides */
  .competition_reporting_1 { padding: 5.5px 1%; border-left: 1px solid #d1d5db; border-radius: 7px 0 0 0; }
  .competition_reporting_1_2 { border-left: 1px solid #d1d5db; }
  .competition_reporting_3 { text-align: center; }
  .competition_reporting_4 { border-radius: 0 7px 0 0; }


  /* --- Table row display count --- */

  .competition_table_rows {
    width: 100%;
    margin: 0 0 15px 0;
    font-size: 14px;
    float: left;
  }


  /* --- Pagination (center variant) --- */

  .reporting_pagination_holder_center,
  .reporting_pagination_holder_center_top {
    width: 100%;
    margin: 20px 0 5px 0;
    text-align: center;
    float: left;
    position: relative;
    z-index: 2;
  }

  .reporting_pagination_holder_center a,
  .reporting_pagination_holder_center_top a {
    width: 28px;
    height: 28px;
    margin: 0 2px 3px 2px;
    padding: 6px 1px;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
    background: #fff;
    display: inline-block;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
  }

  .reporting_pagination_holder_center a:hover,
  .reporting_pagination_holder_center_top a:hover {
    border-color: #4a3aff;
    color: #4a3aff;
  }

  .reporting_pagination_holder_center .pagination_arrow_left,
  .reporting_pagination_holder_center_top .pagination_arrow_left,
  .reporting_pagination_holder_center .pagination_arrow_right,
  .reporting_pagination_holder_center_top .pagination_arrow_right {
    display: inline-block;
  }

  .reporting_pagination_holder_center .pagination_arrow_left a,
  .reporting_pagination_holder_center_top .pagination_arrow_left a,
  .reporting_pagination_holder_center .pagination_arrow_right a,
  .reporting_pagination_holder_center_top .pagination_arrow_right a {
    width: 20px;
    padding-left: 0;
    padding-right: 0;
    font-size: 14px;
    border: none;
    background: none;
  }

  /* --- Search bar --- */

  #competition_reporting_search_results_wrapper {
    width: 100%;
    margin-top: 0;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999999;
  }

  #competition_reporting_search_results {
    width: 100%;
    margin: 0;
    border: 1px solid #d1d5db;
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
    float: left;
    z-index: 999999;
    overflow: hidden;
  }

  #competition_reporting_search_results a {
    color: #4a3aff;
  }

  .competition_reporting_search_row {
    width: 100%;
    padding: 12px 10px;
    font-size: 14px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-sizing: border-box;
    float: left;
    transition: background 0.15s;
  }

  .competition_reporting_search_row:hover {
    background: #f9fafb;
  }


  /* --- Entry methods grid --- */

  #user_reporting_entry_methods_show_more {
    padding: 9px 24px;
    font-size: 15px;
    line-height: 1;
    color: #4a3aff;
    background: #fff;
    border: 1px solid #4a3aff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-block;
  }

  #user_reporting_entry_methods_show_more:hover {
    opacity: 0.7;
  }

  /* --- Stats table (inline stats above table) --- */

  .competition_table_each {
    margin: 0 40px 0 0;
    display: inline-block;
  }

  .competition_table_num {
    color: #4a3aff;
    font-size: 28px;
    font-weight: bold;
    float: left;
  }

  .competition_table_text {
    margin: 8px 0 0 10px;
    font-size: 15px;
    float: left;
  }


  /* --- Page heading --- */

  #sub_header_2,
  .sub_header_2 {
    width: 100%;
    margin: 5px 0;
    padding: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: left;
    float: left;
  }


  /* --- Back links --- */

  #reporting_top_row_links_wrapper {
    width: 100%;
    margin: 0;
    text-align: left;
    float: left;
  }

  #reporting_top_row_links_wrapper_2 {
    width: 100%;
    margin: 20px 0 0 0;
    text-align: left;
    float: left;
  }

  .reporting_top_row_link {
    margin: 0;
    display: inline-block;
  }

  .reporting_top_row_link a {
    font-size: 15px;
    color: #4a3aff;
    font-weight: bold;
    text-decoration: underline;
  }


  /* --- Divider --- */

  #competition_divider {
    width: 100%;
    margin: 5px 0;
    border-top: 1px solid #e5e7eb;
    float: left;
  }


  /* --- CSV upload table --- */

  #csv_upload_table table {
    width: 100%;
    float: left;
    border-collapse: collapse;
  }

  #csv_upload_table table,
  #csv_upload_table th,
  #csv_upload_table td {
    border: 1px solid #d1d5db;
  }

  #csv_upload_table th,
  #csv_upload_table td {
    padding: 8px 12px;
    font-size: 13px;
    text-align: left;
  }

  #csv_upload_table th {
    background: #f9fafb;
    font-weight: 600;
    color: #6b7280;
  }


  /* --- Photo contest controls --- */

  .photo_contest_controls {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0 15px 0;
    float: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Download button (file uploads in table) */
  .download-button {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 16px;
    color: #fff;
    background-color: #4a3aff;
    text-decoration: none;
    text-align: center;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
  }

  .download-button:hover {
    opacity: 0.8;
  }

  /* Approval badges */
  .approval_status_badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .approval_status_pending { background-color: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
  .approval_status_approved { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
  .approval_status_rejected { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

  .approval_actions {
    display: inline-flex;
    gap: 6px;
  }

  .approval_actions button {
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
  }

  .approve_btn { background-color: #28a745; color: white; }
  .approve_btn:hover { background-color: #218838; }
  .reject_btn { background-color: #dc3545; color: white; }
  .reject_btn:hover { background-color: #c82333; }

  /* Filter tabs */
  .approval_filter_tabs { display: inline-flex; gap: 6px; }

  .approval_filter_tab {
    padding: 6px 12px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #374151;
  }

  .approval_filter_tab:hover { background-color: #f3f4f6; border-color: #9ca3af; }
  .approval_filter_tab.active { background-color: #4a3aff; color: white; border-color: #4a3aff; }

  /* Sort control */
  .sort_control select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    background-color: white;
  }

  /* View toggle buttons */
  .view_toggle_buttons { display: inline-flex; gap: 4px; }

  .view_toggle_btn {
    padding: 6px 12px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
  }

  .view_toggle_btn:hover { background-color: #f3f4f6; }
  .view_toggle_btn.active { background-color: #4a3aff; color: white; border-color: #4a3aff; }

  /* Gallery view */
  #gallery_view {
    display: none;
    width: 100%;
    padding: 20px 0;
    float: left;
  }

  .gallery_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
  }

  .gallery_item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
  }

  .gallery_item:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .gallery_item_image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #f5f5f5;
  }

  .gallery_item_info { padding: 15px; }
  .gallery_item_votes { font-size: 18px; font-weight: 700; color: #4a3aff; margin-bottom: 8px; }
  .gallery_item_actions { border-top: 1px solid #eee; padding: 0 15px 15px; }


  /* --- Pulsate animation --- */

  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }

  .pulsate {
    animation: pulse 1s ease-in-out;
  }


  /* --- Winner/disqualification icons --- */

  .competition_checkboxes_winner_icon {
    width: 100%;
    color: #d32f2f;
    font-size: 16px;
    text-align: center;
    float: left;
  }


  /* --- Scroll to top button --- */

  #toTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #4a3aff;
    color: white;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 16px;
    transition: opacity 0.3s;
  }

  #toTopBtn:hover {
    opacity: 0.8;
  }

}
