/*
 * I'll Be Attending — tool styles.
 * Derived from the original index.html; the MyAgLife chrome (Publisher Bar,
 * header, footer) has been removed because the WordPress theme provides it.
 * Every selector is scoped under #im-attending-root so nothing here can affect the theme.
 */

/* State-machine hide, defined here (synchronous stylesheet) so hidden states
 * never flash before the Tailwind CDN finishes generating its own .hidden. */
#im-attending-root .hidden { display: none !important; }

/* Event logo in the hero — JS sets the src and flips display to block. Sized to
 * sit comfortably above the eyebrow; object-fit keeps every logo's aspect ratio. */
#im-attending-root .hero-logo {
    max-width: 320px;
    max-height: 128px;
    width: auto;
    height: auto;
    margin: 0 auto 2.5rem;
    object-fit: contain;
}
@media (max-width: 640px) {
    #im-attending-root .hero-logo { max-width: 240px; max-height: 104px; margin-bottom: 2rem; }
}

:root {
    
    --mal-utility-bg: #0E0E0E;            
    --mal-utility-text: rgba(255,255,255,0.55);
    --mal-utility-text-strong: rgba(255,255,255,0.85);
    --mal-gold: #C8A84E;                   
    --mal-gold-bright: #E0C264;
    --mal-green-dark: #1F4D2C;             
    --mal-green-darker: #143D21;           
    --mal-green-mid: #2D6A2E;              
    --mal-green-bright: #3B8B3D;           
    --mal-green-bright-hover: #2F7332;

    
    --ccc-blue: var(--mal-green-bright);   
    --ccc-blue-deep: var(--mal-green-mid); 
    --navy-deep: var(--mal-green-dark);    
    --paper: #FFFFFF;                      
    --paper-warm: #F8F8F5;
    --cream-on-navy: #FFFFFF;              
    --ink: #14181F;
    --ink-soft: #5A6168;
    --rule: #DDDFD9;                       
    --copper: #B89968;                     
    --accent: var(--mal-green-bright);     
  }

  #im-attending-root {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  #im-attending-root .display{ font-family: 'Playfair Display', Georgia, serif; }
  #im-attending-root .smallcaps{
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
    font-size: 0.72rem;
  }
  #im-attending-root .numeral{
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 500;
  }
  #im-attending-root .hairline{ border-color: var(--rule); }

  
  #im-attending-root .paper-grain{
    background-color: var(--paper);
  }

  
  #im-attending-root .fade-in{ animation: fade-up 0.5s ease-out; }
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  
  #im-attending-root .dropzone{
    border: 1px dashed var(--rule);
    transition: border-color 0.2s, background-color 0.2s;
  }
  #im-attending-root .dropzone:hover, #im-attending-root .dropzone.drag{
    border-color: var(--mal-green-bright);
    background-color: rgba(59,139,61,0.04);
  }

  
  #im-attending-root .btn-primary{
    background: var(--mal-green-bright);
    color: #fff;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 1rem 2rem;
    transition: all 0.2s ease;
    border-radius: 2px;
  }
  #im-attending-root .btn-primary:hover{ background: var(--mal-green-bright-hover); transform: translateY(-1px); }
  #im-attending-root .btn-primary:disabled{ opacity: 0.4; cursor: not-allowed; transform: none; }

  #im-attending-root .btn-ghost{
    border: 1px solid var(--rule);
    color: var(--ink-soft);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 500;
    font-size: 0.72rem;
    padding: 0.85rem 1.6rem;
    background: transparent;
    transition: all 0.2s ease;
  }
  #im-attending-root .btn-ghost:hover{ border-color: var(--ink); color: var(--ink); }

  
  #im-attending-root input[type="text"], #im-attending-root input[type="email"]{
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--rule);
    padding: 0.75rem 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    color: var(--ink);
    width: 100%;
    transition: border-color 0.2s;
  }
  #im-attending-root input[type="text"]:focus, #im-attending-root input[type="email"]:focus{
    outline: none;
    border-bottom-color: var(--ccc-blue);
  }

  
  #im-attending-root .spinner{
    width: 32px; height: 32px;
    border: 2px solid var(--rule);
    border-top-color: var(--ccc-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  
  #im-attending-root .progress-track{ background: var(--rule); height: 1px; }
  #im-attending-root .progress-fill{ background: var(--ccc-blue); height: 1px; transition: width 0.4s ease; }

  
  #im-attending-root .preview-frame{
    box-shadow:
      0 1px 0 rgba(20,24,31,0.04),
      0 8px 24px -8px rgba(20,24,31,0.12),
      0 24px 60px -20px rgba(20,24,31,0.18);
  }

  @media (max-width: 640px) {
    #im-attending-root .smallcaps{ font-size: 0.65rem; }
  }

  
  #im-attending-root .step-marker{
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
  }
  #im-attending-root .step-marker-num{
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 2.6rem;
    color: var(--ccc-blue);
    line-height: 1;
    flex-shrink: 0;
  }
  #im-attending-root .step-marker-rule{
    flex-shrink: 0;
    width: 56px;
    height: 1.5px;
    background: var(--mal-green-bright);
    opacity: 0.6;
  }
  #im-attending-root .step-marker-label{
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    margin: 0;
    line-height: 1;
  }
  #im-attending-root .step-optional{
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--ink-soft);
    margin-left: 0.6rem;
    font-style: italic;
    font-size: 0.85rem;
  }

  
  #im-attending-root .substep{
    max-width: 520px;
    margin: 0 auto 2.5rem auto;
    text-align: left;
  }
  #im-attending-root .substep:last-child{ margin-bottom: 0; }
  #im-attending-root .substep-header{
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    margin-bottom: 1rem;
  }
  #im-attending-root .substep-num{
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--mal-green-bright);
    line-height: 1;
    flex-shrink: 0;
  }
  #im-attending-root .substep-label{
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--ink);
    line-height: 1.3;
  }
  #im-attending-root .substep-body{
    padding-left: 2.2rem;
  }
  #im-attending-root .substep-help{
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.65;
    font-style: italic;
    margin-top: 0.85rem;
  }
  #im-attending-root .substep-help strong{
    font-style: normal;
    font-weight: 600;
    color: var(--ink);
    background: rgba(59,139,61,0.10);
    padding: 0.05rem 0.35rem;
    border-radius: 2px;
  }

  
  #im-attending-root .copy-success{
    background: var(--mal-green-bright) !important;
    color: #fff !important;
    border-color: var(--mal-green-bright) !important;
  }

  
  #im-attending-root .sample-preview{
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem 1.2rem;
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    border-radius: 2px;
  }
  #im-attending-root .sample-thumb{
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    box-shadow:
      0 1px 0 rgba(20,24,31,0.04),
      0 4px 12px -4px rgba(20,24,31,0.10);
    border-radius: 2px;
    overflow: hidden;
  }
  #im-attending-root .sample-thumb img,
  #im-attending-root .sample-thumb svg{ display: block; width: 100%; height: 100%; object-fit: cover; }
  #im-attending-root .sample-caption{ flex: 1; text-align: left; }

  @media (max-width: 540px) {
    #im-attending-root .sample-preview{
      flex-direction: column;
      text-align: center;
      gap: 0.9rem;
    }
    #im-attending-root .sample-thumb{ width: 200px; height: 200px; }
    #im-attending-root .sample-caption{ text-align: center; }
  }

  
  #im-attending-root .share-textarea{
    width: 100%;
    min-height: 96px;
    padding: 0.9rem 1rem;
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    border-radius: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ink);
    resize: vertical;
    transition: border-color 0.2s;
  }
  #im-attending-root .share-textarea:focus{
    outline: none;
    border-color: var(--mal-green-bright);
    background: #fff;
  }

  
  #im-attending-root #share-onward.highlight-pulse{
    animation: share-pulse 1.6s ease-out;
    border-radius: 3px;
  }
  @keyframes share-pulse {
    0%   { background-color: transparent; }
    18%  { background-color: rgba(59,139,61,0.10); box-shadow: 0 0 0 12px rgba(59,139,61,0.05); }
    100% { background-color: transparent; box-shadow: 0 0 0 0 rgba(59,139,61,0); }
  }

  @media (max-width: 640px) {
    #im-attending-root .step-marker-num{ font-size: 2.1rem; }
    #im-attending-root .step-marker-rule{ width: 36px; }
    #im-attending-root .step-marker-label{ font-size: 0.85rem; }
    #im-attending-root .substep-body{ padding-left: 0; }
  }

  
  #im-attending-root.template-invitation {
    --paper: #000000;
    --paper-warm: rgba(245,235,211,0.04);
    --ink: #F5EBD3;
    --ink-soft: rgba(245,235,211,0.5);
    --rule: rgba(200,168,78,0.25);
    --ccc-blue: #C8A84E;
    --ccc-blue-deep: #F5EBD3;
    --accent: #C8A84E;
    --mal-green-bright: #C8A84E;
    --mal-green-bright-hover: #E0C264;
    --mal-green-mid: #C8A84E;
    background: #000000 !important;
  }
  #im-attending-root.template-invitation .display {
    font-family: 'Newsreader', Georgia, serif;
  }
  #im-attending-root.template-invitation .numeral {
    font-family: 'Newsreader', Georgia, serif;
  }
  #im-attending-root.template-invitation .smallcaps {
    font-family: 'Manrope', 'Inter', sans-serif;
  }
  #im-attending-root.template-invitation #hero-section h1 {
    font-style: normal;
    font-weight: 400;
  }
  #im-attending-root.template-invitation .step-marker-num {
    font-family: 'Newsreader', Georgia, serif;
  }
  #im-attending-root.template-invitation .btn-primary {
    color: #000000;
  }
  #im-attending-root.template-invitation input[type="text"] {
    font-family: 'Newsreader', Georgia, serif;
    border-bottom: 1px solid rgba(200,168,78,0.3) !important;
  }
  #im-attending-root.template-invitation input[type="text"]:focus {
    border-bottom-color: #C8A84E !important;
  }
  #im-attending-root.template-invitation input[type="text"]::placeholder {
    color: rgba(245,235,211,0.3);
  }
  #im-attending-root.template-invitation .dropzone svg {
    color: rgba(245,235,211,0.4) !important;
  }
  #im-attending-root.template-invitation .preview-frame {
    background: #000000 !important;
    box-shadow: 0 1px 0 rgba(200,168,78,0.08), 0 8px 24px -8px rgba(0,0,0,0.4) !important;
  }
  #im-attending-root.template-invitation .copy-success {
    background: #C8A84E !important;
    color: #000000 !important;
    border-color: #C8A84E !important;
  }
  #im-attending-root.template-invitation #share-onward.highlight-pulse {
    animation-name: share-pulse-inv;
  }
  @keyframes share-pulse-inv {
    0%   { background-color: transparent; }
    18%  { background-color: rgba(200,168,78,0.08); box-shadow: 0 0 0 12px rgba(200,168,78,0.04); }
    100% { background-color: transparent; box-shadow: 0 0 0 0 rgba(200,168,78,0); }
  }

  
  #im-attending-root .landing-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 3rem;
  }
  #im-attending-root .landing-card{
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 3px;
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }
  #im-attending-root .landing-card:hover{
    transform: translateY(-2px);
    box-shadow:
      0 1px 0 rgba(20,24,31,0.04),
      0 8px 24px -8px rgba(20,24,31,0.14),
      0 24px 60px -20px rgba(20,24,31,0.18);
    border-color: var(--mal-green-bright);
  }
  #im-attending-root .landing-card-thumb{
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--paper-warm);
  }
  #im-attending-root .landing-card-thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
  }
  #im-attending-root .landing-card:hover .landing-card-thumb img{ transform: scale(1.03); }
  #im-attending-root .landing-card-thumb-placeholder{
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--mal-green-dark), var(--mal-green-mid));
  }
  #im-attending-root .landing-card-badge{
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: var(--mal-utility-bg);
    color: var(--mal-gold);
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: 0.4rem 0.7rem;
    border-radius: 2px;
    border: 1px solid var(--mal-gold);
  }
  #im-attending-root .landing-card-body{
    padding: 1.4rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  #im-attending-root .landing-card-name{
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.45rem;
    color: var(--mal-green-mid);
    line-height: 1.2;
    margin-bottom: 0.6rem;
  }
  #im-attending-root .landing-card-meta{
    font-size: 0.82rem;
    color: var(--ink-soft);
    line-height: 1.5;
    margin-bottom: 1.1rem;
    flex: 1;
  }
  #im-attending-root .landing-card-meta-sep{ opacity: 0.4; margin: 0 0.15rem; }
  #im-attending-root .landing-card-cta{
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--mal-green-bright);
    align-self: flex-start;
  }
  #im-attending-root .landing-card-disabled .landing-card-name{ color: var(--ink-soft); }
  #im-attending-root .landing-card-disabled .landing-card-cta{ color: var(--ink-soft); }
  #im-attending-root .landing-card-disabled .landing-card-thumb-placeholder{
    background: linear-gradient(135deg, var(--mal-utility-bg), #2a2a2a);
  }
