/* ==========================================================================
   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 {
    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: 11px 16px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    text-align: left;
    font-weight: 400;
    box-sizing: border-box;
    display: block;
    text-decoration: none;
    transition: background 0.1s ease;
  }

  .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 signup button children (generated in pricing_header_includes.inc.php) */
  .pricing_signup_button a,
  .pricing_signup_button button {
    width: 100%;
    margin: 0 auto;
    padding: 14px 24px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    background: #4a3aff;
    border: none;
    cursor: pointer;
    outline: none;
    border-radius: 12px;
    display: block;
    transition: background 0.2s, transform 0.15s;
  }

  .pricing_signup_button a:hover,
  .pricing_signup_button button:hover {
    background: #3d2ee6;
    opacity: 1;
    transform: translateY(-1px);
  }

  /* Disabled "Current Plan" button on pricing cards */
  .pricing_signup_button button:disabled,
  .pricing_signup_button button.stripe_plan_button_current {
    background: #e5e5ea !important;
    border-color: #e5e5ea !important;
    color: #888 !important;
    cursor: default !important;
    opacity: 1 !important;
  }

  /* Payment modal plan tier tab - active state (toggled via JS) */
  .pm-plan-tab-active {
    background: #4a3aff !important;
    color: #fff !important;
    border-color: #4a3aff !important;
  }

  /* Price display container (used on pricing cards, updated by jQuery .html()) */
  .payment_price_monthly {
    font-size: 48px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
  }

  /* JS-created price formatting spans (injected via jQuery .html()) */
  .dollar_sign {
    font-size: 24px;
    color: #9ca3af;
    vertical-align: super;
    font-weight: 600;
    padding-right: 2px;
  }

  .month_small {
    font-size: 16px;
    color: #9ca3af;
    font-weight: 500;
    padding-left: 2px;
  }

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

  /* --- 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: 9px 12px;
    color: #4b5563;
    font-size: 14px;
    text-align: left;
    font-weight: 400;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    opacity: 1;
  }

  .sw-sidebar-link:hover {
    background: #f3f4f6;
    color: #111827;
    opacity: 1;
  }

  .sw-sidebar-link-active {
    background: rgba(74, 58, 255, 0.08);
    color: #4a3aff;
    font-weight: 500;
  }

  .sw-sidebar-link-active:hover {
    background: rgba(74, 58, 255, 0.12);
  }

  .sw-sidebar-link-active .nav_left_icon,
  .sw-sidebar-link-active .nav_left_icon i {
    color: #4a3aff;
  }

  /* --- Marketing Header Nav Links ---
     Used on logged-out pages in header_public.inc.php
     ========================================================================== */

  .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: now CSS-only via .tooltipped in tailwind.css (app.css build) */

  /* --- 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
   ========================================================================== */

/* Admin layout: converted to inline Tailwind responsive classes */

#body_main_right_inner_below {
  clear: both;
}

/* ==========================================================================
   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 logo swap */
    #sw_logo_full { display: none !important; }
    #sw_logo_square { display: block !important; }

    /* 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: 60px;
      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);
    opacity: 0;
  }

  #widget_form {
    padding-bottom: 100px;
  }

  /* Hide Intercom launcher on mobile build/edit pages so it doesn't overlap save buttons */
  @media (max-width: 767px) {
    body:has(#widget_form) .intercom-lightweight-app,
    body:has(#widget_form) #intercom-container .intercom-launcher {
      display: none !important;
    }
  }

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

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

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

  .sw_dob_select {
    margin-top: 0;
    cursor: pointer;
    min-width: 0;
    padding-right: 24px;
    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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  .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"],
      input[type="tel"], textarea, select) {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--color-text-primary);
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s 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"],
      input[type="tel"], textarea, select):focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1) !important;
    outline: none !important;
  }

  .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;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

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

  /* 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);
    box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1);
  }

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

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

  .full_width_hidden {
    width: 100%;
    margin: 0;
    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) {
    .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;
    z-index: 2;
  }

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

  /* entry_group_handle_delete styles moved to inline Tailwind classes */

  /* Entry method search wrapper */
  .em-search-item {
    float: left;
  }

  /* 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;
  }

  .sw-em-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: inherit;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 9px;
    vertical-align: middle;
  }

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

  .entry_group_button label img,
  .entry_method_add label img {
    display: inline !important;
    vertical-align: middle;
  }

  /* 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;
    color: #374151;
    background: none;
  }

  .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, box-shadow 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: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1) !important;
    outline: none !important;
  }

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

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

  /* Input holder layout inside entry methods */
  .entry_method_body_inner .input_holder_1,
  .unlock_rewards_body_inner .input_holder_1 {
    width: 48%;
    margin: 0 2% 0 0;
    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: 6px 0;
  }

  /* Collapse empty wrapper divs (PHP variable was empty string) */
  .entry_method_body_inner .full_width_no_margin:empty,
  .unlock_rewards_body_inner .full_width_no_margin:empty {
    padding: 0;
    display: none;
  }

  /* Email integration selected state (JS-toggled via addClass/removeClass) */
  .email_integration_selected {
    background: #eef2ff !important;
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
  }

  /* Email integration API details container */
  .entry_method_body_inner .email_integration_holder {
    background: #f8f9fb;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 4px 20px 20px;
    margin: 16px 0 0 0;
    clear: both;
    overflow: hidden;
  }

  .entry_method_body_inner .email_wrapper_api_header,
  .entry_method_body_inner .email_wrapper_api_header_2 {
    font-size: 15px;
    font-weight: 600;
    margin: 12px 0 0 0;
    color: #1f2937;
  }

  /* API fields + Fetch button row - float layout (matches JS) */
  .entry_method_body_inner .email_wrapper_api_1 {
    width: 100%;
    margin-bottom: 4px;
    float: left;
  }

  /* Fetch Lists button - float next to the 48% input */
  .entry_method_body_inner .email_wrapper_api_1 .vertical_align_bottom {
    margin-top: 50px;
    margin-bottom: 10px;
    margin-left: 20px;
    float: left;
  }

  .entry_method_body_inner .vertical_align_bottom {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .entry_method_body_inner .vertical_align_bottom_2 {
    width: 100%;
    margin: 10px 0;
    float: left;
  }

  .entry_method_body_inner .full_width_email_link {
    margin-top: 10px;
    clear: both;
  }

  .entry_method_body_inner .full_width_email_instructions {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
  }

  .entry_method_body_inner .full_width_email_instructions a {
    color: #6366f1;
  }

  /* OAuth Connect buttons (email integrations) - JS-generated buttons lack Tailwind classes */
  .connect_account,
  .connect_account_again {
    height: 38px;
    padding: 0 15px;
    color: #fff !important;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    background-color: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    display: inline-block;
    transition: opacity 0.2s ease;
    white-space: nowrap;
  }

  .connect_account:hover,
  .connect_account_again:hover {
    opacity: 0.8;
  }

  .connect_account:disabled {
    opacity: 0.6;
    cursor: default;
  }

  /* Fetch Lists button (email integrations) - JS-generated buttons lack Tailwind classes */
  .email_list_submit {
    height: 38px;
    padding: 0 15px;
    color: #fff !important;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    background-color: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    display: inline-block;
    transition: opacity 0.2s ease;
    white-space: nowrap;
  }

  .email_list_submit:hover {
    opacity: 0.8;
  }

  .entry_method_body_inner .email_wrapper_api_2 {
    width: 100%;
    clear: both;
  }

  /* 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;
    white-space: nowrap;
  }

  /* 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: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1) !important;
    outline: none !important;
  }

  /* 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 containers */
  .entry_method_body_inner .daily_select_holder,
  .entry_method_body_inner .daily_select_holder_show,
  .entry_method_body_inner .timer_select_holder,
  .entry_method_body_inner .timer_select_holder_show {
    margin: 10px 0 15px 0;
  }

  /* 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: 0;
  }

  /* Entry group section headers */
  .entry_group_handle {
    width: 100%;
    padding: 6px 12px;
    margin: 12px 0 0 0;
    font-size: 13px;
    font-weight: 500;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-bottom: none;
    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: 0;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
  }

  /* Textarea connected to handle - no top border/radius */
  .entry_group_each .sw-textarea {
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    min-height: 120px;
  }

  .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;
  }

  /* Sub-groups inside picker modals: inline instead of absolute */
  .sw-picker-modal .entry_group_hide {
    position: relative !important;
    float: left !important;
    clear: both !important;
    width: 100% !important;
    top: auto !important;
    margin: 20px 0 !important;
    z-index: auto !important;
    box-shadow: none !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 14px 16px 10px !important;
    background: #f9fafb !important;
  }

  .sw-picker-modal .entry_group_exit {
    top: 12px;
    right: 12px;
  }

  /* 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 {
    font-size: 0;
    font-weight: 600;
    font-style: normal;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px 2px 5px;
    border-radius: 50px;
    text-transform: uppercase;
    vertical-align: middle;
    position: relative;
    top: -1px;
    margin-left: 4px;
    line-height: 18px;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: #f3f4f6;
    color: #4a3aff;
  }
  .paid_plan_tip::before {
    content: "\f023";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 7px;
    opacity: 0.6;
  }
  .paid_plan_tip::after {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }
  .available_in_pro_plan_text.paid_plan_tip::after { content: "PRO"; }
  .available_in_business_plan_text.paid_plan_tip::after { content: "BUSINESS"; }
  .available_in_premium_plan_text.paid_plan_tip::after { content: "PREMIUM"; }
  .available_in_enterprise_plan_text.paid_plan_tip::after { content: "ENTERPRISE"; }
  .available_in_pro_plan_text.paid_plan_tip,
  .available_in_business_plan_text.paid_plan_tip,
  .available_in_premium_plan_text.paid_plan_tip,
  .available_in_enterprise_plan_text.paid_plan_tip {
    color: #4a3aff;
    background: #f3f4f6;
  }
  .available_in_pro_plan_text.paid_plan_tip:hover,
  .available_in_business_plan_text.paid_plan_tip:hover,
  .available_in_premium_plan_text.paid_plan_tip:hover,
  .available_in_enterprise_plan_text.paid_plan_tip:hover {
    background: #e5e7eb;
  }

  .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: 0 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) {

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

    .copy_giveaway_wrapper {
      margin: 0 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.1);
    }

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

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

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

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

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

@layer components {

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

  @media (max-width: 767px) {
    .pricing_signup_button a,
    .pricing_signup_button button {
      padding: 10px 8px;
      font-size: 13px;
    }

    .payment_price_monthly {
      font-size: 32px;
      line-height: 1.1;
    }

    .dollar_sign {
      font-size: 18px;
    }

    .month_small {
      font-size: 13px;
    }
  }

  @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);
}

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

/* Checkboxes: .sw-checkbox custom styled checkbox
   Uses SVG background for pixel-perfect centered checkmark */
[type="checkbox"].sw-checkbox:not(:checked) + span::before,
[type="checkbox"].sw-checkbox:checked + span::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  background-repeat: no-repeat;
  background-position: center;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

[type="checkbox"].sw-checkbox:not(:checked) + span:hover::before {
  border-color: #94a3b8;
}

[type="checkbox"].sw-checkbox:checked + span::before {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3L4.5 8.5L2 6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px;
}

[type="checkbox"].sw-checkbox:checked + span::after {
  content: none;
}

[type="checkbox"].sw-checkbox + span {
  position: relative;
  padding-left: 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  line-height: normal;
  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: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

[type="radio"].sw-radio:not(:checked) + span:hover::before {
  border-color: #94a3b8;
}

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

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

[type="radio"].sw-radio + span {
  position: relative;
  padding-left: 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  line-height: normal;
  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;
}


/* ==========================================================================
   Payment Modal - Explicit width rules
   Ensures two-column layout on desktop regardless of Tailwind layer conflicts.
   Loaded after all Tailwind builds, outside @layer for highest cascade priority.
   ========================================================================== */

#payment_modal > div > div {
  max-width: 480px;
}

@media (min-width: 1024px) {
  #payment_modal > div > div {
    max-width: 860px;
  }
}

/* Pricing card border */
.pricing-card {
  border: 1px solid #e5e7eb !important;
}

.pricing-card:hover {
  border-color: rgba(74, 58, 255, 0.3) !important;
}

.pricing-card.pricing-highlight {
  border: 2px solid #4a3aff !important;
}

/* ==========================================================================
   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 - now styled via Tailwind in reporting.inc.php */

  /* #report_table - now styled via Tailwind in user.func.php */
  #report_table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
  }

  #report_table tbody tr:hover {
    background: #f9fafb;
  }

  #report_table tbody td {
    padding: 10px 16px;
    font-size: 13px;
    vertical-align: top;
  }

  #report_table tbody td a {
    color: #4a3aff;
  }


  /* --- 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;
  }


  /* Page heading, back links, divider - now styled via Tailwind */

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

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

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

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


  /* --- 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;
  }


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

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

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

}

/* ==========================================================================
   Error States (unlayered for highest cascade priority)
   ========================================================================== */

.sw-field-error {
  border-color: #ef4444 !important;
}

/* TinyMCE wrapper inherits error state from its child textarea */
.tox-tinymce.sw-field-error {
  border-color: #ef4444 !important;
}

.sw-label-error {
  color: #ef4444 !important;
}

.entry_method_each.sw-entry-error,
.unlock_rewards_each.sw-entry-error {
  border-color: #fca5a5 !important;
  box-shadow: 0 0 0 1px #fca5a5 !important;
}

.entry_method_error_box {
  display: none;
  clear: both !important;
  float: left !important;
  width: 100% !important;
  margin: 20px 0 0 !important;
  padding: 10px 14px !important;
  color: #b91c1c !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

.entry_method_error_box ul {
  margin: 0 !important;
  padding-left: 18px !important;
  list-style: disc !important;
}

.entry_method_error_box li {
  margin-bottom: 2px !important;
}

.entry_method_error_box li:last-child {
  margin-bottom: 0 !important;
}

/* Builder gray cards - remove on mobile for more breathing room */
@media (max-width: 768px) {
  #widget_form .bg-\[\#f8f9fb\].rounded-xl {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }
}
