/* ============================================================
   ISD Volunteer Sign-Up – Frontend Styles
   Styled to match PETFIX Big Island / Avada theme
   Island Sun Design · v1.0.1
   ============================================================ */

/*
   Brand palette derived from petfixbigisland.org:
   --petfix-teal:      #4a9e87   (primary brand green-teal)
   --petfix-teal-dark: #3a7d6a   (hover state)
   --petfix-teal-pale: #edf7f4   (light tint for widget bg)
   --petfix-text:      #333333   (Avada default body text)
   --petfix-border:    #d8d8d8   (Avada input/divider border)
   --petfix-warn:      #c0392b   (cancel / error red)
*/

/* ── Widget container ───────────────────────────────────────── */
.isd-volunteer-widget {
    margin: 1.5rem 0 0.5rem;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.isd-vol-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: #edf7f4;
    border: 1px solid #b8ddd5;
    border-left: 4px solid #4a9e87;
    border-radius: 0;          /* Avada uses square/minimal corners */
}

.isd-vol-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.isd-vol-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── Heading ────────────────────────────────────────────────── */
.isd-vol-heading {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a9e87;
}

/* ── Count badge ────────────────────────────────────────────── */
.isd-vol-count {
    display: inline-block;
    font-size: 13px;
    color: #555;
    font-weight: 400;
}

/* ── Status badge ───────────────────────────────────────────── */
.isd-vol-status {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 2px;
    text-transform: uppercase;
}

.isd-vol-status--pending {
    background: #fdf6e3;
    color: #a07800;
    border: 1px solid #f0d060;
}

.isd-vol-status--confirmed {
    background: #edf7f4;
    color: #2e7d62;
    border: 1px solid #4a9e87;
}

/* ── Role selector ──────────────────────────────────────────── */
.isd-vol-role {
    width: 100%;
    max-width: 320px;
    padding: 7px 10px;
    border: 1px solid #d8d8d8;
    border-radius: 0;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s;
    appearance: auto;
}
.isd-vol-role:focus {
    outline: none;
    border-color: #4a9e87;
}

/* ── Notes textarea ─────────────────────────────────────────── */
.isd-vol-notes {
    width: 100%;
    max-width: 420px;
    padding: 7px 10px;
    border: 1px solid #d8d8d8;
    border-radius: 0;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.isd-vol-notes:focus {
    outline: none;
    border-color: #4a9e87;
}
.isd-vol-notes::placeholder {
    color: #aaa;
}

/* ── Buttons – match Avada flat button style ────────────────── */
.isd-vol-btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: none;
    line-height: 1.4;
    text-decoration: none;
    align-self: flex-start;
}

/* Sign-up (primary – teal, matches "Register Pet" / "Donate" header buttons) */
.isd-vol-signup {
    background: #4a9e87;
    color: #fff;
}
.isd-vol-signup:hover:not(:disabled),
.isd-vol-signup:focus:not(:disabled) {
    background: #3a7d6a;
    color: #fff;
    text-decoration: none;
}
.isd-vol-signup:active:not(:disabled) {
    background: #2f6355;
}

/* Cancel – outlined red */
.isd-vol-cancel {
    background: #fff;
    color: #c0392b;
    border: 2px solid #c0392b;
    padding: 7px 18px;
}
.isd-vol-cancel:hover:not(:disabled),
.isd-vol-cancel:focus:not(:disabled) {
    background: #c0392b;
    color: #fff;
    text-decoration: none;
}

/* Login prompt – teal outline */
.isd-vol-login {
    background: #fff;
    color: #4a9e87;
    border: 2px solid #4a9e87;
    padding: 7px 18px;
}
.isd-vol-login:hover,
.isd-vol-login:focus {
    background: #4a9e87;
    color: #fff;
    text-decoration: none;
}

/* Full / disabled */
.isd-vol-full {
    background: #f5f5f5;
    color: #999;
    border: 1px solid #d8d8d8;
    cursor: not-allowed;
}

/* Loading state */
.isd-vol-btn.isd-loading {
    opacity: 0.65;
    pointer-events: none;
}
.isd-vol-btn.isd-loading::before {
    content: '';
    width: 11px;
    height: 11px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: isd-spin 0.6s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes isd-spin {
    to { transform: rotate(360deg); }
}

/* ── Message area ───────────────────────────────────────────── */
.isd-vol-message {
    font-size: 13px;
    font-weight: 500;
    min-height: 1.2em;
}
.isd-vol-message.isd-msg-success { color: #2e7d62; }
.isd-vol-message.isd-msg-error   { color: #c0392b; }

/* ── My Signups shortcode ───────────────────────────────────── */
.isd-my-signups ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.isd-my-signups li {
    padding: 0.5rem 0.75rem;
    background: #f9f9f9;
    border-left: 3px solid #4a9e87;
    font-size: 14px;
    color: #333;
}

/* ── Month / list / calendar views – compact ───────────────── */
.tribe-events-calendar .isd-volunteer-widget,
.tribe-events-loop .isd-volunteer-widget,
.tribe-events-list .isd-volunteer-widget {
    margin: 0.5rem 0 0;
}

.tribe-events-calendar .isd-vol-inner,
.tribe-events-loop .isd-vol-inner,
.tribe-events-list .isd-vol-inner {
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tribe-events-calendar .isd-vol-heading,
.tribe-events-loop .isd-vol-heading {
    font-size: 11px;
}

.tribe-events-calendar .isd-vol-btn,
.tribe-events-loop .isd-vol-btn {
    font-size: 11px;
    padding: 6px 12px;
}
.tribe-events-calendar .isd-vol-cancel,
.tribe-events-loop .isd-vol-cancel,
.tribe-events-calendar .isd-vol-login,
.tribe-events-loop .isd-vol-login {
    padding: 4px 10px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .isd-vol-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
    .isd-vol-role,
    .isd-vol-notes {
        max-width: 100%;
    }
}
