/* ==========================================================================
   Birthday banner + "Today's Birthdays" wishing section
   ========================================================================== */

.stdb-birthday-zone {
    margin: 0 0 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stdb-cake-icon-svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

/* ---- "It's YOUR birthday" hero card ----------------------------------
   Layout:   [ profile ]  Happy Birthday
                          (Name)
             [ Content ..................... ]
             [ cake ]      wishes       balloons
   Works the same on mobile and desktop (sizes scale down on small screens). */
.stdb-birthday-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "avatar copy    copy"
        "content content content"
        "cake   count   balloons";
    align-items: center;
    column-gap: 22px;
    row-gap: 18px;
    padding: 26px 30px 22px;
    border-radius: var(--stdb-radius-lg);
    background: var(--stdb-gradient-hero);
    color: #fff;
    box-shadow: var(--stdb-shadow-lg);
    animation: stdbBirthdayPop .5s cubic-bezier(.34,1.56,.64,1) both;
}

.stdb-birthday-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.28), transparent 45%),
        radial-gradient(circle at 6% 92%, rgba(255,255,255,.16), transparent 40%),
        radial-gradient(#ffffff 1.5px, transparent 1.5px);
    background-size: auto, auto, 26px 26px;
    opacity: .5;
    mix-blend-mode: overlay;
    pointer-events: none;
}
.stdb-birthday-hero > * { position: relative; z-index: 1; }

/* Profile photo (circle, top-left) */
.stdb-birthday-hero-avatar { grid-area: avatar; }
.stdb-birthday-hero-avatar img {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.9);
    box-shadow: 0 10px 24px rgba(15,23,42,.28);
    background: #fff;
}

/* "Happy Birthday" + Name (top-right) */
.stdb-birthday-hero-copy { grid-area: copy; min-width: 0; }
.stdb-birthday-hero-copy h2 {
    margin: 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.15;
    text-shadow: 0 2px 10px rgba(15,23,42,.2);
}
.stdb-birthday-hero-greeting {
    font-size: clamp(22px, 3.4vw, 32px);
    font-weight: 800;
    letter-spacing: -.01em;
}
.stdb-birthday-hero-name {
    font-size: clamp(16px, 2.4vw, 22px);
    font-weight: 700;
    opacity: .95;
    overflow-wrap: anywhere;
}

/* Content box (middle) */
.stdb-birthday-hero-content {
    grid-area: content;
    padding: 16px 20px;
    border-radius: var(--stdb-radius);
    background: rgba(255,255,255,.16);
    border: 1.5px solid rgba(255,255,255,.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.stdb-birthday-hero-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
    color: #fff;
}

/* Cake in a circle (bottom-left) */
.stdb-birthday-hero-cake {
    grid-area: cake;
    align-self: end;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #fff;
    color: var(--stdb-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(15,23,42,.25);
    border: 3px solid rgba(255,255,255,.9);
}
.stdb-birthday-hero-cake .stdb-cake-icon-svg { width: 38px; height: 38px; }

/* Wish counter (bottom-centre) */
.stdb-birthday-hero-count {
    grid-area: count;
    justify-self: center;
    align-self: end;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.35);
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    backdrop-filter: blur(2px);
}
.stdb-birthday-hero-count .dashicons { font-size: 16px; width: 16px; height: 16px; color: #fecdd3; }

/* Balloons (bottom-right) */
.stdb-birthday-hero-balloons {
    grid-area: balloons;
    align-self: end;
    justify-self: end;
    width: 110px;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 6px 8px rgba(15,23,42,.18));
}
.stdb-bln { transform-box: fill-box; transform-origin: 50% 100%; animation: stdbBirthdayFloat 4.5s ease-in-out infinite; }
.stdb-bln-b { animation-delay: .7s; }
.stdb-bln-c { animation-delay: 1.4s; }

@media (prefers-reduced-motion: reduce) {
    .stdb-bln, .stdb-birthday-hero { animation: none; }
}

.stdb-birthday-wishes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.stdb-birthday-wish-chip {
    background: var(--stdb-purple-light);
    border: 1px solid #e9d5ff;
    color: var(--stdb-ink);
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12.5px;
}
.stdb-birthday-wish-chip strong { color: var(--stdb-purple-dark); }

/* ---- "Today's Birthdays" section (visible to everyone) ------------- */
.stdb-birthday-others {
    background: var(--stdb-surface);
    border: 1px solid var(--stdb-border);
    border-radius: var(--stdb-radius-lg);
    padding: 20px 22px;
    box-shadow: var(--stdb-shadow-sm);
}

.stdb-birthday-others-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--stdb-border);
}
.stdb-birthday-others-head-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stdb-amber-light);
    color: var(--stdb-amber);
}
.stdb-birthday-others-head-icon .stdb-cake-icon-svg { width: 20px; height: 20px; }
.stdb-birthday-others-head h3 { margin: 0 0 2px; font-size: 15.5px; font-weight: 800; color: var(--stdb-ink); }
.stdb-birthday-others-head p { margin: 0; font-size: 12.5px; color: var(--stdb-muted); }

.stdb-birthday-others-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.stdb-birthday-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--stdb-border);
    border-radius: var(--stdb-radius);
    background: var(--stdb-bg);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.stdb-birthday-card:hover {
    box-shadow: var(--stdb-shadow);
    border-color: #ddd6fe;
    transform: translateY(-2px);
}

.stdb-birthday-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stdb-birthday-card-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.stdb-birthday-card-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--stdb-purple-light), var(--stdb-shadow-sm);
}
.stdb-birthday-card-cake {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    color: var(--stdb-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--stdb-bg);
    box-shadow: var(--stdb-shadow-sm);
}
.stdb-birthday-card-cake .stdb-cake-icon-svg { width: 12px; height: 12px; }

.stdb-birthday-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.stdb-birthday-card-body strong {
    font-size: 13.5px;
    color: var(--stdb-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stdb-birthday-card-role {
    display: inline-flex;
    align-self: flex-start;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--stdb-blue-light);
    color: var(--stdb-blue-dark);
}
.stdb-birthday-card-role-teacher { background: var(--stdb-purple-light); color: var(--stdb-purple-dark); }
.stdb-birthday-card-role-student { background: var(--stdb-blue-light); color: var(--stdb-blue-dark); }

.stdb-birthday-card-action { width: 100%; }

.stdb-birthday-wish-form {
    display: flex;
    gap: 6px;
    width: 100%;
}
.stdb-birthday-wish-form input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--stdb-border);
    border-radius: 999px;
    font-size: 12.5px;
    background: var(--stdb-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.stdb-birthday-wish-form input[type="text"]:focus {
    outline: none;
    border-color: var(--stdb-purple);
    box-shadow: 0 0 0 3px var(--stdb-purple-light);
}

.stdb-birthday-send-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--stdb-gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--stdb-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.stdb-birthday-send-btn:hover { transform: scale(1.08); box-shadow: var(--stdb-shadow); }
.stdb-birthday-send-btn:disabled { opacity: .6; cursor: default; transform: none; }
.stdb-birthday-send-btn .dashicons { font-size: 15px; width: 15px; height: 15px; }

.stdb-birthday-wished-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--stdb-green-dark);
    background: var(--stdb-green-light);
    border: 1px solid #a7f3d0;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.stdb-birthday-wished-badge .dashicons { font-size: 14px; width: 14px; height: 14px; }

.stdb-form-hint {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--stdb-muted);
}

@keyframes stdbBirthdayPop {
    0%   { transform: scale(.94); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes stdbBirthdayFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-10px) rotate(3deg); }
}

@media (max-width: 680px) {
    .stdb-birthday-hero { padding: 18px 16px 16px; column-gap: 14px; row-gap: 14px; }
    .stdb-birthday-hero-avatar img { width: 68px; height: 68px; border-width: 3px; }
    .stdb-birthday-hero-content { padding: 12px 14px; }
    .stdb-birthday-hero-content p { font-size: 13.5px; }
    .stdb-birthday-hero-cake { width: 52px; height: 52px; }
    .stdb-birthday-hero-cake .stdb-cake-icon-svg { width: 29px; height: 29px; }
    .stdb-birthday-hero-count { padding: 7px 12px; font-size: 12px; }
    .stdb-birthday-hero-balloons { width: 78px; }
    .stdb-birthday-others-list { grid-template-columns: 1fr; }
}
