/*
Theme Name: PharmEasy Forums
Theme URI: https://yoursite.com
Author: Your Name
Description: Q&A community theme with hero, browse topics, and trending questions.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: your-theme-name
*/

/* ==========================================================================
   CSS variables (PharmEasy-style palette)
   ========================================================================== */
   :root {
    --color-primary-dark: #1a365d;
    --color-primary-darker: #0f2744;
    --color-accent: #0d9488;
    --color-accent-hover: #0f766e;
    --color-accent-light: #5eead4;
    --color-orange: #f59e0b;
    --color-orange-light: #fbbf24;
    --color-white: #ffffff;
    --color-grey-50: #f9fafb;
    --color-grey-100: #f3f4f6;
    --color-grey-200: #e5e7eb;
    --color-grey-400: #9ca3af;
    --color-grey-600: #4b5563;
    --color-grey-800: #1f2937;
    --color-pill-bg: #a5f3fc;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --radius-pill: 9999px;
    --radius-card: 12px;
  }
  
  /* ==========================================================================
     Base
     ========================================================================== */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-grey-800);
    background-color: #F5F8FC;
  }

  /* Hide WordPress admin bar */
  #wpadminbar {
    display: none !important;
  }

  html.admin-bar {
    margin-top: 0 !important;
  }
  
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  a {
    color: var(--color-accent);
    text-decoration: none;
  }
  
  /* ==========================================================================
     Site header (dark blue bar)
     ========================================================================== */
  .site-header {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
  }
  
  .site-header .header-menu-toggle {
    background: none;
    border: none;
    color: var(--color-white);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .site-header .site-logo {
    flex: 1;
    font-weight: 700;
    font-size: 1.25rem;
  }
  
  .site-header .site-logo .logo-accent {
    color: var(--color-orange);
  }
  
  .site-header .header-search {
    flex: 1;
    max-width: 200px;
  }
  
  .site-header .header-search input {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
  }
  
  .site-header .header-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
  }
  
  /* ==========================================================================
     Site footer (minimal)
     ========================================================================== */
  .site-footer {
    background-color: var(--color-grey-200);
    padding: 20px 16px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-grey-600);
  }

  /* Feed avatar placeholder (used for anonymous posts) */
  .peforums-feed-card-avatar-placeholder{
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-grey-200);
    flex-shrink: 0;
  }

  /* ==========================================================================
     Poll UI (YOP votes + AnsPress questions)
     ========================================================================== */
  .peforums-feed-item-poll .peforums-poll-meta-line {
    margin: 0 0 10px;
    color: var(--color-grey-600);
    font-size: 14px;
    line-height: 22px;
  }

  .peforums-poll-feed-choices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .peforums-poll-feed-choice {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid #DCE4F1;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    box-shadow: 0px 2px 10px 0px #0000000A;
    max-width: 380px;

    font-weight: 400;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0px;

  }

  .peforums-feed-item-poll.is-loading .peforums-poll-feed-choice {
    pointer-events: none;
    opacity: 0.7;
  }

  .peforums-poll-feed-choice:focus {
    outline: 2px solid rgba(13, 148, 136, 0.35);
    outline-offset: 2px;
  }

  /* Full-height progress fill inside the pill */
  .peforums-poll-feed-choice-bar-wrap {
    position: absolute;
    top: 0;
    left: -4px;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: #FFFFFF;
    display: block;
  }

  .peforums-poll-feed-choice-bar {
    display: block;
    height: 100%;
    width: 0%;
    background: #EDF2F9; /* slightly darker blue fill */
    transition: width 220ms ease;
    box-shadow: 0px 2px 10px 0px #0000000A;
  }

  /* Selected state: green outline + green fill */
  .peforums-poll-feed-choice.is-selected {
    border-color: #10847E;
    box-shadow: 0 0 0 1px rgba(16, 132, 126, 0.15);
  }

  .peforums-poll-feed-choice.is-selected .peforums-poll-feed-choice-bar-wrap {
    background: #EAF7F3;
  }

  .peforums-poll-feed-choice.is-selected .peforums-poll-feed-choice-bar {
    background: #C7F0E4;
  }

  /* Content should sit above fill */
  .peforums-poll-feed-choice-radio,
  .peforums-poll-feed-choice-label,
  .peforums-poll-feed-choice-pct {
    position: relative;
    z-index: 1;
  }

  .peforums-poll-feed-choice-radio {
    width: 21px;
    height: 21px;
    border-radius: 999px;
    border: 1.87px solid #6E787E;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    background: transparent;
  }

  .peforums-poll-feed-choice-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: transparent;
  }

  .peforums-poll-feed-choice-check{
    display:block;
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    margin-top: -1px;
  }

  .peforums-poll-feed-choice.is-selected .peforums-poll-feed-choice-radio {
    border-color: #10847E;
    background: #10847E;
  }

  .peforums-poll-feed-choice-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 24px;
    font-weight: 400;
    color: #30363C;
    margin-right: auto;

  }

  .peforums-poll-feed-choice-pct {
    font-size: 14px;
    line-height: 24px;
    font-weight: 400;
    color: #6E787E;
    white-space: nowrap;
  }

  .peforums-poll-feed-choice.is-selected .peforums-poll-feed-choice-pct {
    color: #0F766E;
    font-weight: 600;
  }

  /* Question content media group on single question page */
  .question-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }

  /* Answer content media group on single question page */
  .answer-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }

  /* Image thumbnails in question/answer content (square) */
  .question-media img,
  .answer-media img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
  }

  /* Inline videos in question and answer content (380x186) */
  .question-content video,
  .ap-answer-content video {
    width: 380px;
    height: 186px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
  }

  /* Override MediaElement/WordPress inline video sizing to 380x186 */
  .wp-video,
  .mejs-container.wp-video-shortcode,
  .mejs-container.wp-video-shortcode video,
  .mejs__container.wp-video-shortcode,
  .mejs__container.wp-video-shortcode video {
    width: 380px;
    max-width: 380px;
    height: 186px;
    max-height: 186px;
    border-radius: 12px;
    overflow: hidden;
  }

  /* Answer content media group on single question page */
  .answer-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }

  /* Hide legacy AnsPress attachments block now that media is handled inline */
  .ap-attachments{
    display: none !important;
  }

  @media (max-width: 768px) {
    .question-media,
    .answer-media {
      gap: 4px;
    }
  }

  /* Ensure profile page activity media does not break layout */
  .peforums-user-profile-main .peforums-feed-card-media-thumb{
    width: fit-content;
  }

  .peforums-user-profile-main .peforums-feed-card-media-strip{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .peforums-user-profile-main .peforums-feed-card-media-thumb img,
  .peforums-user-profile-main .ap-answer-content img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
  }



  .peforums-user-profile-main .peforums-feed-card-media-thumb-video video,
  .peforums-user-profile-main .ap-answer-content video {
    width: 380px;
    height: 186px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
  }