/* C:\xampp\htdocs\ahaondeag\public\assets\stylesheets\components.css */

.card{
  width: min(100%, var(--max-sml));
  border-radius: var(--radius-lge);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sml);
}

.card--padded {
  padding: var(--space-4) var(--space-3);
}

/* ---------------------------------
      BUTTONS
---------------------------------- */


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;

  padding: 0.65rem 1rem;
  border-radius: var(--radius-sml);
  border: 1px solid transparent;

  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;

  cursor: pointer;
  user-select: none;

  transition: background-color 0.18s ease,
              color 0.18s ease,
              border-color 0.18s ease,
              box-shadow 0.18s ease;
}


.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}


.btn--primary {
  /* --btn--primary-bg: #0f5a3f; */
  background-color: var(--btn-primary-bg);
  color: #fff;
  border-color: var(--btn-primary-bg);
}


.btn--primary:hover {
  background-color: color-mix(in srgb, var(--irish-green) 85%, black);
  border-color: color-mix(in srgb, var(--irish-green) 85%, black);
}

.btn--primary:active {
  background-color: color-mix(in srgb, var(--irish-green) 75%, black);
}

.btn--danger {
  background-color: #c0392b;
  color: #fff;
  border-color: #c0392b;
}

.btn--danger:hover {
  background-color: color-mix(in srgb, #c0392b 85%, black);
  border-color: color-mix(in srgb, #c0392b 85%, black);
}

.btn--danger:active {
  background-color: color-mix(in srgb, #c0392b 75%, black);
}

.btn--wide {
  width: 66%;
  display: block;
  margin-inline: auto;
}

.btn--full {
  width: 100%;
}

/* Action card */
.action-card{
  display: grid;
  grid-template-columns: 2rem 1fr 1rem;
  gap: var(--space-3);
  align-items: center;

  padding: 0.5rem 0.55rem;
  border-radius: var(--radius-sml);
  text-decoration: none;

  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sml);

  transition: transform .12s ease, border-color .12s ease, background-color .12s ease;

  -webkit-tap-highlight-color: transparent;

}

.action-card:hover{
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(0,0,0,.18);
}

.action-card__icon{
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sml);
  display: grid;
  place-items: center;
}

.action-card__icon img{
  width: 1.75rem;
  height: 1.75rem;
}

.action-card__label{
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.action-card__text{
  display: grid;
  gap: 0.15rem;
}

.action-card__hint{
  display: block;
  font-size: .98rem;
  color: var(--text-muted);
}

.action-card__chev{
  opacity: .75;
  font-size: 1.6rem;
  line-height: 1;
}

/* Accent stripe (Irish colours) */
.action-card--green{ border-left: 5px solid var(--irish-green); }
.action-card--white{ border-left: 5px solid var(--surface); box-shadow: inset 5px 0 0 rgba(0,0,0,.06), var(--shadow-sml); }
.action-card--orange{ border-left: 5px solid var(--irish-orange); }




.brand{
  display: flex;
  align-items: center;
  gap: var(--space-1a);
  text-decoration: none;
}

.brand img{
  display: block;
}
 
.brand .brandword{
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text);

}

/* ---------------------------------
      3 DOTS MENU BUTTON
---------------------------------- */

/* Menu button */
.dots-menu-btn{
  width: var(--icon-lg);
  height: var(--icon-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: var(--radius-sml);
  cursor: pointer;
}

.dots-menu-btn span{
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--irish-green);
}

.dots-menu-btn:hover{
  background: rgba(0,0,0,0.06);
}

.dots-menu-btn:active{
  opacity: .7;
  transform: scale(.92);
}

.menu-trigger {
  display: flex;
  align-items: center;
}

/* ---------------------------------
   NAV MENU DRAWER
---------------------------------- */

.body--no-scroll{
  overflow: hidden;
}

.drawer-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 80;
}

.drawer-backdrop--visible{
  opacity: 1;
  pointer-events: auto;
}

.drawer{
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
  box-shadow: -6px 0 18px rgba(0,0,0,0.12);
  z-index: 90;
}

@media (min-width: 768px){
  .drawer{ width: 320px; }
}

.drawer--open{
  transform: translateX(0);
}

.drawer__inner{
  padding: var(--space-3);
}


.drawer__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.drawer__title{
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--irish-green);
}

.drawer__close{
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sml);
  cursor: pointer;
  color: var(--irish-green);
  font-size: 1.6rem; 
  line-height: 1;
}

.drawer__close:hover{
  background: var(--irish-orange-menu-bg);
  font-weight: 700;
}


.drawer__item{
  display: block;
  padding: .75rem;
  margin-bottom: .25rem;
  border-radius: var(--radius-sml);
  text-decoration: none;
  color: var(--irish-green);
  transition: background-color .18s ease, color .18s ease;
}

.drawer__item:hover{
  background-color: var(--irish-orange-menu-bg);
}

.drawer__item,
.drawer__item:visited{
  color: var(--irish-green);
  text-decoration: none;
}

.drawer__item:focus-visible{
  outline: 3px solid color-mix(in srgb, var(--irish-green) 35%, white);
  outline-offset: 2px;
}

.drawer__logout{
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.drawer__logout button{
  border: none;
  background: none;
  padding: .75rem;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-sml);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.drawer__logout button:hover{
  background: rgba(0,0,0,0.06);
}

/* Edge swipe zone (you already render it in layout.php) */
#right-edge-zone{
  position: fixed;
  top: 64px;          /* approx header height */
  height: calc(100dvh - 64px);
  right: 0;
  width: 28px;
  z-index: 60;
  background: transparent;
  touch-action: pan-y;
}

.site-header-actions{
  display: flex;
  align-items: center;
  gap:0;
}

/* Forms in headers can introduce weird spacing */
.logout-form{
  margin: 0;
}


.header-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}



/* --- Drawer hard lock (prevents cascade bugs) --- */
#drawer-backdrop.drawer-backdrop{
  position: fixed;
  inset: 0;
  height: auto;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
}

#drawer-backdrop.drawer-backdrop.drawer-backdrop--visible{
  opacity: 1;
  pointer-events: auto;
}

#drawer.drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 260px;
  background: var(--surface);
  transform: translateX(100%);
  z-index: 90;
}

#drawer.drawer.drawer--open{
  transform: translateX(0);
}



/* ---------------------------------
/* FOOTER
/---------------------------------- */


.legal-footer {
  padding: var(--space-3) var(--space-2);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.separator {
  opacity: 0.5;
}

.legal-footer a {
  text-decoration: none;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
  text-decoration: underline;
}

.footer-meta {
  opacity: 0.7;
}




/* ---------------------------------
      AUTH (shared)
---------------------------------- */

.auth-card h1{
  margin: 0 0 var(--space-3);
  text-align: center;
}

.auth-switch{
  margin-top: var(--space-3);
  text-align: center;
}

.auth-switch span{
  color: color-mix(in srgb, var(--text) 70%, transparent);
}

/* Auth errors */
.auth-errors{
  border: 1px solid color-mix(in srgb, var(--irish-green) 25%, var(--border));
  background: color-mix(in srgb, var(--irish-green) 8%, white);
  border-radius: var(--radius-sml);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}

.auth-errors ul{
  margin: 0;
  padding-left: 1.1rem;
}

.auth-errors li{
  margin: 0.25rem 0;
}


/* ----------------------------
   Idea card component
---------------------------- */

.idea-card{
  position: relative;
  padding: var(--space-2);
}

.idea-card__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.idea-card__left{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.idea-card__author{
  color: var(--irish-dark-green);
  font-weight: 500;
  font-size: .9rem;
  text-decoration: none;

}



.idea-card__votes{
  font-size: .9rem;
  letter-spacing: .02em;
  white-space: nowrap;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.idea-card__content{
  margin: 0;
  line-height: 1.45;
  font-weight: 600;
}

.idea-card__meta{
  margin: var(--space-2) 0 0;
  font-size: .9rem;
  color: var(--text-muted);
}

.idea-card__bottom{
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.idea-card__date{
  text-align: center;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: .9rem;
}

.idea-card__flag{
  justify-self: start;
}

.idea-card__vote{
  justify-self: end;
}

.idea-card__stage{
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: .2rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--irish-green) 5%, #fff);
  color: var(--text);
  font-size: .82rem;
}

.idea-card__text-action,
.idea-card__status{
  font-size: .9rem;
}

.idea-card__text-action{
  border: 0;
  background: none;
  padding: 0;
  color: var(--aha-link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.idea-card__text-action:hover{
  color: color-mix(in srgb, var(--aha-link) 75%, black);
}

.flag-info{
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--irish-green) 6%, #fff);
}

.icon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform .12s ease,
    box-shadow .12s ease,
    background-color .12s ease;
}

.icon-btn img{
  display: block;
  width: 26px;
  height: 26px;
}

.icon-btn:focus-visible{
  outline: 2px solid var(--aha-link);
  outline-offset: 2px;
}

.icon-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,.12);
}

.icon-btn:active{
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0,0,0,.15) inset;
}

.icon-btn.is-disabled{
  opacity: .95;
  pointer-events: none;
  box-shadow: none;
  cursor: default;
}

.idea-badge{
  width: 36px;
  height: 36px;
  display: inline-block;
  vertical-align: middle;
  border-radius: 999px;
  background: #fff;
}

.idea-badge:hover{
  transform: scale(1.05);
}

.badge--risky{
  margin-left: .25rem;
}


/* ---------------------------------
   FLASH MESSAGES
---------------------------------- */

.flash-container {
  width: 100%;
  max-width: var(--max-sml);
  margin: 0 auto var(--space-2);
  padding: 0 var(--space-3);
  text-align: center;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sml);
  font-size: 0.95rem;
  margin-bottom: var(--space-1);
  border: 1px solid transparent;
}

.flash-success {
  background: color-mix(in srgb, var(--irish-green) 12%, white);
  border-color: color-mix(in srgb, var(--irish-green) 30%, transparent);
  color: var(--irish-dark-green);
}

.flash-error {
  background: color-mix(in srgb, #c0392b 10%, white);
  border-color: color-mix(in srgb, #c0392b 25%, transparent);
  color: color-mix(in srgb, #c0392b 85%, black);
}

.flash-info {
  background: color-mix(in srgb, var(--aha-link) 10%, white);
  border-color: color-mix(in srgb, var(--aha-link) 25%, transparent);
  color: color-mix(in srgb, var(--aha-link) 85%, black);
}

.flash-warning {
  background: color-mix(in srgb, var(--irish-orange) 15%, white);
  border-color: color-mix(in srgb, var(--irish-orange) 35%, transparent);
  color: var(--irish-orange-dark);
}