/* === base.css === */

body {
    font-family: Calibri, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 1em;
    text-align: center;
}
header {
  background-color: var(--theme-color);
  padding: 0.4em 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1em;
  font-size: 1em;
}

@media (max-width: 470px) {
  header {
    font-size: 0.85em;
  }
}

@media (max-width: 300px) {
  header {
    font-size: 0.75em;
  }
}


header img {
    width: auto;
    max-width: 50px;
    height: auto;
}
h1 {
    color: var(--theme-color);
    font-size: 1.5em;
    margin-top: 1em;
}

@media (max-width: 480px) {
    header img {
        max-width: 50px;
        height: auto;
    }
    h1 {
        font-size: 1.2em;
    }
}



.btn,
.button,
a.button {
    display: inline-block;
    background-color: var(--theme-color);
    color: white;
    padding: 0.6em 1.2em;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95em;
    cursor: pointer;
}

.btn:hover,
.button:hover,
a.button:hover {
    background-color: var(--theme-color-dark)
}

#logo-img {
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
body {
  margin: 0;
  padding-left: env(safe-area-inset-left, 1rem);
  padding-right: env(safe-area-inset-right, 1rem);
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}
.card, .wrapper, main {
  max-width: 97%;
  box-sizing: border-box;
}
@media (max-width: 200px) {
  html, body {
    min-width: 200px;
    overflow-x: auto;
  }

  .card-scaler {
    transform: scale(0.6);
    transform-origin: top center;
  }

  header img {
    max-width: 40px;
  }

  h1 {
    font-size: 1em;
  }
}

/* ==========================================================================
   Card Component Styles - Member Card Design
   ========================================================================== */

/* Base card layout */
.card {
    position: relative;
    display: inline-block;
    background-color: white;
    padding: 1.2em 1.2em 0.8em 1.2em; /* top right bottom left */
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    max-width: 95%;
    width: 350px;
    text-align: left;
    overflow: hidden;
}

/* Watermark background */
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("/branding/logo-black.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 90%;
    opacity: 0.07;
    z-index: 0;
}

/* Content layer positioning */
.card-content {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Email Modal Styles
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 1.5em;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
}

/* Form elements */
input[type="email"] {
    width: 80%;
    padding: 0.5em;
    margin-top: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.close {
    float: right;
    font-size: 1.2em;
    cursor: pointer;
}

/* Loading indicator */
#sendingStatus {
    margin-top: 1em;
    display: none;
    color: var(--theme-color);
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--theme-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Card scaling for small screens */
.card-scaler {
    transform-origin: top left;
    width: fit-content;
    margin: auto;
}

@media (max-width: 339px) {
    .card-scaler {
        transform: scale(0.88);
    }
}

@media (max-width: 300px) {
    .card-scaler {
        transform: scale(0.78);
    }
}

@media (max-width: 260px) {
    .card-scaler {
        transform: scale(0.7);
    }
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Important overrides */
.card {
    width: 350px;
    max-width: none;
}

.card-title {
    white-space: nowrap;
}