/* Custom semantic elements */

brand {
    xdisplay: block;
    font-size: 1.25rem;
    font-weight: 600;
}
brand>a{text-decoration:none;}
brand>a>span{
    flex: 1;
    min-width: 0;
    font-size: 0.5em;
    color: black;
    white-space: normal;
    word-break: break-word;
}
brand>a{
    display: flex;
    align-items: center;
    gap: 1rem;
}
brand>a>logo{
    display: block;
    flex-shrink: 0;
    width: 280px;
    height: 40px;
    background-image: url('/Assets/img/memorize.live.logo.wide.png');
    mix-blend-mode: multiply;
}

menu {
  xmax-height: 2.2em; /* todo: block wrapping - might cause problems*/
  list-style: none;           /* Remove bullets */
  margin: 0;                  /* Remove margins */
  padding: 0;                 /* Remove padding */
  display: flex;              /* or however you want to layout menu items */
}

menu>a{
    margin-left:1em;
    text-decoration:none;
    color:black;
}
menu>a:hover{
    text-decoration:underline;
}

container {
    display: block;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1rem;
}

toolbar {
    display: block;
    padding: 1rem 0;
}

notifications, breadcrumbs, columns {
    display: block;
}

:root {
  --btn-cta-color: #B53A3C; /* #A16348; */   /*color of edge of page in bible*/
  --btn-cta-hover: #3AB53C;  /*#A16348;*/ /* #B3826C; */   
}


body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;  /* Full viewport height */
}

body::before { /* site background image */
  background-image: url('/Assets/img/memorize_bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;  /* Optional: keeps image fixed while scrolling */
    
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Optional: reinforces stationary effect */
  z-index: -1; /* Keeps it behind content */

  filter: blur(8px);     /* adjust blur strength */
  transform: scale(1.05);/* avoids seeing sharp edges after blur */
  background-color: rgba(255, 255, 255, 0.2); /* faint white wash */
  background-blend-mode: screen;              /* lightens highlights */
}

body>header{
  background-color: rgba(255, 255, 255, 0.6); /*  white wash */
  background-blend-mode: screen;              /* lightens highlights */
  padding:4px;
}

body>footer{
  background-color: rgba(255, 255, 255, 0.6); 
  background-blend-mode: screen;              
}

main {
  flex: 1;  /* Takes all available space */
}

footer {
  padding: 1rem 0;
}

footer container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

footer p {
  margin-bottom: 0;
}

header.hero{
    background-color: rgba(255, 255, 255, 0.6);
    border-radius:12px;
    padding:1em;
    margin-bottom:1em;
    display: flex;
    align-items: flex-start;
    gap: 2em;
}

header.hero>.picture {
  background-image: url('/Assets/img/hero.jpg');
  background-size: cover;
  background-position: center;
    width: 300px;
    height: 300px;
    flex-shrink: 0;
}

section{
    background-color: rgba(255, 255, 255, 0.6);
    border-radius:12px;
    padding:1em;
}

a.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--btn-cta-color);  /* orange */
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 1.125rem;  /* large equivalent */
}

a.button:hover {
  background-color: var(--btn-cta-hover);
}


body>header a.cta {padding: 0.25rem 0.5rem; white-space: nowrap;}

.grid{
  display: grid; /* Pico already does this, but it's fine to repeat */
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  grid-auto-rows: 1fr; /* make all items in the grid the same height */
}
div.grid>article.box{
    border:1px solid white;
    background:rgba(255,255,255,0.3);
}

a.is-info{
    border:1px solid black;
    background-color:transparent;
    color:black;
}

div.card{
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    margin-top: 1em;
    padding:1em;
}

div.grid>div.box{
    background-color: transparent;
    border: 1px solid white;
    margin: 1em;
    padding: 1em;
    border-radius: 12px;
}

section>article , section>article>article{
    background-color:transparent;
    
    border: 1px solid white;
    border-radius: 12px;
}
div.tag{
    background-color:white;
    border-radius:4px;
    display: inline-block;
    font-weight:bold;
    padding:2px;
    margin:4px;
}
article.box, article.card{
    background-color:transparent;
    border:1px solid white;
    border-radius:12px;
}
article>div>div.is-narrow{
    float: left;
    font-size: 2em;
    font-weight: bold;
    margin-right: 18px;
}

/* Responsive Flexbox Menu Styles */

/* Desktop (> 768px): Menu items flow horizontally */
@media (min-width: 769px) {
    header nav {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    header nav > menu {
        display: flex;
        flex-direction: row;
        margin-left: auto;
    }
    
    header nav > menu > a {
        margin-left: 1em;
    }
}

/* Mobile (≤ 768px): Menu items stack vertically below logo */
@media (max-width: 768px) {
    header nav {
        display: flex;
        flex-direction: column;
    }

    brand>a {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    brand>a>logo {
        width: 100%;
        max-width: 320px;
        height: 40px;
    }

    brand>a>span {
        flex: none;
        font-size: 0.75rem;
        line-height: 1.4;
    }

    header nav > menu {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 1rem;
        gap: 0.5rem;
    }

    header nav > menu > a {
        width: calc(50% - 2rem);
        box-sizing: border-box;
        padding: 0.75rem 0.5rem;
        background-color: rgba(255, 255, 255, 0.5);
        border-radius: 4px;
        text-align: center;
        border-bottom: none;
    }

    header nav > menu > a:hover {
        background-color: var(--pico-primary);
        color: white;
        text-decoration: none;
        padding-left: 0.5rem;
    }

    /* Hero section: stack vertically on mobile */
    header.hero {
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }

    header.hero>.picture {
        width: 100%;
        max-width: 300px;
        height: 300px;
    }

    /* Footer: stack vertically on mobile */
    footer container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
}

/* Hide delete buttons on study cards to make entire card clickable */
.delete-study-btn {
    display: none !important;
}

/* Single study page: keep action items (Edit/Send Now/Reset/Delete) side-by-side */
.study-action-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding-bottom:0; margin-bottom:0;
}
.card-footer-item{margin:0; padding:0;}

.study-action-items > a.card-footer-item,
.study-action-items > .card-footer-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.study-action-items > .card-footer-item form {
    width: 100%;
}

.study-action-items > .card-footer-item form button {
    width: 100%;
    white-space: nowrap;
}

@media (max-width: 768px) {
    footer.study-action-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    footer.study-action-items {
        grid-template-columns: 1fr;
    }
}

/* Profile Tabs - Horizontal Button Layout */
.profile-tabs-list {
    display: flex !important;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    list-style: none;
    background: none;
}

.profile-tabs-list li {
    list-style: none;
    background: none;
    padding: 0;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.profile-tabs-list li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-tabs-list li a span {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.profile-tabs-list li a .icon {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

/* Active Tab - Dark Button Styling */
.profile-tabs-list li.is-active a {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-color: #2c3e50;
    box-shadow: 0 4px 8px rgba(44, 62, 80, 0.3);
    transform: translateY(-1px);
}

.profile-tabs-list li.is-active a:hover {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(44, 62, 80, 0.4);
}

/* Inactive Tabs - Light Button Styling */
.profile-tabs-list li:not(.is-active) a {
    background: rgba(255, 255, 255, 0.8);
    color: #555;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.profile-tabs-list li:not(.is-active) a:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive - Stack to 2 columns on small screens */
@media (max-width: 768px) {
    .profile-tabs-list {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .profile-tabs-list li {
        flex: 1 1 calc(50% - 0.375rem);
        min-width: calc(50% - 0.375rem);
    }
    
    .profile-tabs-list li a {
        font-size: 0.8rem;
        padding: 0.6rem 0.4rem;
        min-height: 3.5rem;
    }
}

/* Very small screens - single column */
@media (max-width: 480px) {
    .profile-tabs-list li {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .profile-tabs-list li a {
        font-size: 0.9rem;
        padding: 0.8rem 0.5rem;
        min-height: 3rem;
    }
}

.is-hidden {
    display: none !important;
}

input[type="radio"]:not(:checked) ~ span,
input[type="radio"]:not(:checked) ~ span span {
    color: black;
}

#schedule-field{position:relative;} /* hack */
div.smallbtn>a{font-size:1em; background-color:transparent} /* hack */
div.pushright{position:absolute; right:1em;} /* hack */

#topic-results, #collection-list {border: 1px solid black; border-radius:8px;}
