/* ATWollongong Team Composer */
.atw-cmp-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9990;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    transition: transform 0.15s ease;
    padding: 0;
}
.atw-cmp-fab:hover { transform: scale(1.06); }
.atw-cmp-fab:focus-visible { outline: 3px solid #999; outline-offset: 3px; }

.atw-cmp-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.atw-cmp-overlay[hidden] { display: none; }
body.atw-cmp-lock { overflow: hidden; }

.atw-cmp-panel {
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    color: #111;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    font-size: 15px;
}
.atw-cmp-panel.is-busy .atw-cmp-body { opacity: 0.6; pointer-events: none; }

.atw-cmp-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 56px 1fr 72px;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.atw-cmp-heading { margin: 0; text-align: center; font-size: 16px; font-weight: 600; }
.atw-cmp-close {
    border: none; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: #111; padding: 4px 8px; justify-self: start;
}
.atw-cmp-share {
    border: none; background: none; color: #111; font-weight: 700; font-size: 15px; cursor: pointer; justify-self: end; padding: 6px 4px;
}
.atw-cmp-share:disabled { opacity: 0.4; cursor: default; }

.atw-cmp-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.atw-cmp-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.atw-cmp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.atw-cmp-tile { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; cursor: pointer; background: #f2f2f2; }
.atw-cmp-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.atw-cmp-tile.is-cover { outline: 2px solid #111; outline-offset: -2px; }
.atw-cmp-badge {
    position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, 0.7); color: #fff;
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
}
.atw-cmp-remove {
    position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%;
    border: none; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 16px; line-height: 24px; cursor: pointer; padding: 0;
}
.atw-cmp-add {
    aspect-ratio: 1 / 1; border: 1.5px dashed #bbb; border-radius: 10px; background: #fafafa; color: #333;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font-size: 13px; padding: 0;
}
.atw-cmp-add-plus { font-size: 28px; line-height: 1; }
.atw-cmp-count { color: #888; font-size: 12px; }
.atw-cmp-hint { margin: 2px 0 6px; font-size: 12px; color: #777; }

.atw-cmp-label { font-size: 13px; font-weight: 600; margin-top: 6px; }
.atw-cmp-input {
    width: 100%; box-sizing: border-box; border: 1px solid #ddd; border-radius: 12px; padding: 11px 13px;
    font-size: 15px; font-family: inherit; background: #fff; color: #111;
}
.atw-cmp-input:focus { outline: none; border-color: #111; }
.atw-cmp-caption { resize: vertical; min-height: 96px; }

.atw-cmp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.atw-cmp-chip {
    border: 1px solid #ddd; background: #fff; color: #111; border-radius: 999px; padding: 8px 16px;
    font-size: 14px; cursor: pointer; font-family: inherit;
}
.atw-cmp-chip.is-on { background: #111; border-color: #111; color: #fff; }

.atw-cmp-note { margin: 8px 0 0; font-size: 12px; color: #777; }
.atw-cmp-status { margin: 0; min-height: 1.2em; font-size: 13px; color: #2e7d32; }
.atw-cmp-status.is-error { color: #c62828; }

.atw-cmp-done { padding: 40px 24px 32px; text-align: center; }
.atw-cmp-done[hidden] { display: none; }
.atw-cmp-tick {
    width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #111; color: #fff;
    font-size: 32px; line-height: 64px;
}
.atw-cmp-done h3 { margin: 0 0 6px; font-size: 20px; }
.atw-cmp-done p { margin: 0 0 20px; color: #555; }
.atw-cmp-done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.atw-cmp-again, .atw-cmp-view {
    border-radius: 999px; padding: 10px 20px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
}
.atw-cmp-again { background: #111; color: #fff; border: none; }
.atw-cmp-view { border: 1px solid #111; color: #111; }

@media (max-width: 600px) {
    .atw-cmp-fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
    .atw-cmp-overlay { padding: 0; align-items: stretch; }
    .atw-cmp-panel { max-width: none; max-height: none; height: 100%; border-radius: 0; }
    body.admin-bar .atw-cmp-overlay { top: var(--wp-admin--admin-bar--height, 46px); }
}

.atw-cmp-body[hidden], .atw-cmp-share[hidden] { display: none; }

/* v1.1: sign-in sheet, consent, member footer */
.atw-cmp-auth { padding: 36px 28px 32px; text-align: center; }
.atw-cmp-auth-icon {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: #f2f2f2; color: #111;
    display: flex; align-items: center; justify-content: center;
}
.atw-cmp-auth h3 { margin: 0 0 8px; font-size: 20px; }
.atw-cmp-auth p { margin: 0 auto 22px; color: #555; max-width: 380px; line-height: 1.5; }
.atw-cmp-auth-actions { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 0 auto; }
.atw-cmp-btn-primary, .atw-cmp-btn-outline {
    display: block; border-radius: 999px; padding: 12px 20px; font-weight: 600; font-size: 15px; text-decoration: none; text-align: center;
}
.atw-cmp-btn-primary { background: #111; color: #fff !important; }
.atw-cmp-btn-outline { border: 1px solid #111; color: #111 !important; }
.atw-cmp-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #444; margin-top: 10px; line-height: 1.45; cursor: pointer; }
.atw-cmp-consent input { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; }
.atw-cmp-who { margin: 6px 0 0; font-size: 12px; color: #888; }
.atw-cmp-who a { color: #555; }

/* v1.2: choose Explore/Story, hashtags, date, credit */
.atw-cmp-choose[hidden], .atw-cmp-group[hidden], .atw-cmp-alias[hidden], .atw-cmp-tag-input[hidden] { display: none; }
.atw-cmp-choose { padding: 28px 20px 32px; }
.atw-cmp-choose h3 { margin: 0 0 16px; font-size: 18px; text-align: center; }
.atw-cmp-choose-cards { display: flex; flex-direction: column; gap: 12px; }
.atw-cmp-choose-card {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
    border: 1px solid #e2e2e2; border-radius: 16px; background: #fff; color: #111; padding: 16px; font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.atw-cmp-choose-card:hover, .atw-cmp-choose-card:focus-visible { border-color: #111; background: #fafafa; outline: none; }
.atw-cmp-choose-icon { width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; background: #f2f2f2; display: flex; align-items: center; justify-content: center; }
.atw-cmp-choose-text { display: flex; flex-direction: column; gap: 2px; }
.atw-cmp-choose-text strong { font-size: 16px; }
.atw-cmp-choose-text span { font-size: 13px; color: #666; }
.atw-cmp-back { align-self: flex-start; border: none; background: none; color: #555; font-size: 13px; cursor: pointer; padding: 0 0 4px; font-family: inherit; }
.atw-cmp-back:hover { color: #111; text-decoration: underline; }
.atw-cmp-group { display: flex; flex-direction: column; gap: 8px; }

.atw-cmp-tagbox {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; box-sizing: border-box;
    border: 1px solid #ddd; border-radius: 12px; padding: 6px 8px; background: #fff; cursor: text;
}
.atw-cmp-tagbox:focus-within { border-color: #111; }
.atw-cmp-tags { display: contents; }
.atw-cmp-tag {
    display: inline-flex; align-items: center; gap: 4px; background: #111; color: #fff; border-radius: 999px;
    padding: 5px 6px 5px 12px; font-size: 13px; font-weight: 600;
}
.atw-cmp-tag-rm { border: none; background: rgba(255,255,255,0.2); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 20px; padding: 0; }
.atw-cmp-tag-input { flex: 1; min-width: 110px; border: none; outline: none; font-size: 15px; font-family: inherit; padding: 6px 4px; background: transparent; color: #111; }
.atw-cmp-date { max-width: 220px; }

.atw-cmp-radios { display: flex; flex-direction: column; gap: 8px; }
.atw-cmp-radio { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.atw-cmp-radio input { width: 16px; height: 16px; margin: 0; }
.atw-cmp-alias { margin-left: 26px; width: calc(100% - 26px); }


/* v1.3: Caption helper */
.atw-ai { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 4px; }
.atw-ai-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.atw-ai-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px;
    border: 1px solid #3B2F2A; border-radius: 999px; background: #F6F1EA; color: #3B2F2A;
    font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.atw-ai-btn:hover:not(:disabled) { background: #3B2F2A; color: #F6F1EA; }
.atw-ai-btn:disabled, .atw-ai-chip:disabled { opacity: 0.55; cursor: progress; }
.atw-ai-undo { border: 0; background: none; padding: 4px 2px; font-family: inherit; font-size: 13px; color: #555; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.atw-ai-tweaks { display: flex; gap: 6px; flex-wrap: wrap; }
.atw-ai-tweaks[hidden] { display: none; }
.atw-ai-chip {
    padding: 6px 12px; border: 1px solid #ddd; border-radius: 999px; background: #fff; color: #333;
    font-family: inherit; font-size: 13px; cursor: pointer;
}
.atw-ai-chip:hover:not(:disabled) { border-color: #3B2F2A; color: #3B2F2A; }
.atw-ai-msg { margin: 0; min-height: 1.1em; font-size: 13px; color: #2e7d32; }
.atw-ai-msg:empty { display: none; }
.atw-ai-msg.is-error { color: #c62828; }
.atw-ai.is-busy .atw-ai-msg { color: #555; }
.atw-ai-hint { margin: 0; font-size: 12px; color: #777; }
.atw-ai-setup { font-size: 13px; font-weight: 600; color: #3B2F2A; text-decoration: underline; text-underline-offset: 3px; }


/* v1.5: Request to post (members and visitors on Explore / Stories) */
.atw-cmp-fab.is-request { width: auto; padding: 0 20px 0 14px; gap: 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.atw-cmp-fab-label { font-family: "DM Sans", sans-serif; font-size: 14px; font-weight: 600; white-space: nowrap; }
.atw-cmp-intro { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 26px; }
.atw-cmp-intro[hidden] { display: none; }
.atw-cmp-intro-eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #8a7f76; }
.atw-cmp-intro h3 { margin: 0; font-family: "Playfair Display", serif; font-size: 24px; line-height: 1.25; color: #1C1917; }
.atw-cmp-intro p { margin: 0; font-size: 15px; line-height: 1.6; color: #333; }
.atw-cmp-intro .atw-cmp-intro-note { font-size: 13px; color: #666; }
.atw-cmp-learn { border: 1px solid #e7e0d6; border-radius: 14px; background: #F8F4EE; padding: 12px 16px; }
.atw-cmp-learn summary { cursor: pointer; font-size: 14px; font-weight: 600; color: #3B2F2A; }
.atw-cmp-learn ul { margin: 10px 0 2px; padding-left: 18px; display: grid; gap: 7px; font-size: 14px; line-height: 1.55; color: #444; }
.atw-cmp-intro .atw-cmp-auth-actions { margin-top: 4px; }
