/*
 * Support Communication Platform - front-end styles.
 * Palette and type follow the existing thewalkofpeace.com theme:
 * body copy #333, headings #535353, accent red #D0021B, card borders
 * #D9D9D9, section background #F3F3F3, dark panels #545454, font stack
 * "ScalaSansPro" (body) / "ScalaSansPro-Bold" (headings, uppercase,
 * letter-spaced) - loaded already by the site theme; Arial/sans-serif is
 * the fallback if this plugin is ever used on a site without those fonts.
 */

.wop-platform {
	--wop-red: #D0021B;
	--wop-text: #333333;
	--wop-heading: #535353;
	--wop-border: #D9D9D9;
	--wop-bg-soft: #F3F3F3;
	--wop-dark: #545454;
	--wop-white: #FFFFFF;
	font-family: "ScalaSansPro", Arial, Helvetica, sans-serif;
	color: var(--wop-text);
	font-size: 16px;
	line-height: 1.6;
	max-width: 1220px;
	margin: 40px auto;
	padding: 0 20px;
	box-sizing: border-box;
}
.wop-platform *, .wop-platform *::before, .wop-platform *::after { box-sizing: border-box; }

.wop-platform h2 {
	color: var(--wop-heading);
	font-family: "ScalaSansPro-Bold", Arial, sans-serif;
	font-weight: normal;
	font-size: 28px;
	margin: 0 0 24px;
}
.wop-platform h3 { color: var(--wop-heading); font-size: 18px; margin: 0 0 10px; }
.wop-platform .wop-subheading {
	margin-top: 32px;
	color: var(--wop-red);
	font-family: "ScalaSansPro-Bold", Arial, sans-serif;
	font-weight: normal;
	font-size: 14px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}
.wop-platform a { color: var(--wop-red); }
.wop-platform a:hover { color: #000; }

/* Notices */
.wop-notice { background: var(--wop-bg-soft); padding: 20px; border-radius: 4px; color: var(--wop-heading); }

/* ---------------- Auth (register / login) ---------------- */
.wop-auth { max-width: 680px; margin: 40px auto; }

.wop-auth__intro { margin-bottom: 30px; color: #555; font-size: 15px; line-height: 1.6; text-align: center; }
.wop-auth__intro p { margin: 0; }

.wop-auth__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 520px) { .wop-auth__choices { grid-template-columns: 1fr; } }
.wop-auth__choice {
	background: var(--wop-bg-soft); border: 1px solid var(--wop-border); border-radius: 8px;
	cursor: pointer; padding: 40px 24px; text-align: center;
	display: flex; flex-direction: column; align-items: center; gap: 10px;
	aspect-ratio: 1 / 1; justify-content: center;
	transition: background .2s, color .2s, border-color .2s;
}
.wop-auth__choice:hover, .wop-auth__choice:focus-visible { background: var(--wop-red); border-color: var(--wop-red); color: #fff; }
.wop-auth__choice-icon { width: 48px; height: 48px; color: var(--wop-red); }
.wop-auth__choice:hover .wop-auth__choice-icon, .wop-auth__choice:focus-visible .wop-auth__choice-icon { color: #fff; }
.wop-auth__choice-icon svg { width: 100%; height: 100%; }
.wop-auth__choice-label {
	font-family: "ScalaSansPro-Bold", Arial, sans-serif; font-weight: normal;
	font-size: 16px; letter-spacing: .5px; color: inherit;
}
.wop-auth__choice-sub { font-size: 13px; color: #888; }
.wop-auth__choice:hover .wop-auth__choice-sub, .wop-auth__choice:focus-visible .wop-auth__choice-sub { color: rgba(255,255,255,.85); }

.wop-auth__panel[hidden] { display: none; }
.wop-auth__back { background: none; border: none; color: var(--wop-red); cursor: pointer; font-size: 14px; padding: 0; margin-bottom: 20px; }
.wop-auth__hint { color: #777; font-size: 13px; margin-top: -12px; margin-bottom: 20px; }

/* ---------------- Forms ---------------- */
.wop-form { max-width: 640px; }
.wop-field { margin-bottom: 18px; }
.wop-field label { display: block; font-family: "ScalaSansPro-Bold", Arial, sans-serif; font-weight: normal; font-size: 13px; letter-spacing: .5px; color: var(--wop-heading); margin-bottom: 6px; }
.wop-field input[type="text"],
.wop-field input[type="email"],
.wop-field input[type="password"],
.wop-field input[type="url"],
.wop-field input[type="date"],
.wop-field textarea,
.wop-field select {
	width: 100%; padding: 11px 14px; border: 1px solid var(--wop-border); border-radius: 4px;
	font-family: inherit; font-size: 15px; color: var(--wop-text); background: var(--wop-white);
}
.wop-field input:focus, .wop-field textarea:focus, .wop-field select:focus { outline: 2px solid var(--wop-red); outline-offset: 1px; }
.wop-field input[disabled] { background: var(--wop-bg-soft); color: #888; }
.wop-hint { display: block; font-size: 12px; color: #888; margin-top: 6px; }
.wop-error { display: block; font-size: 13px; color: var(--wop-red); margin-top: 6px; min-height: 1em; }
.wop-char-count { display: block; font-size: 12px; color: #888; text-align: right; }
.wop-form__status { font-size: 14px; min-height: 1.4em; }
.wop-form__status.is-success { color: #2c7a2c; }
.wop-form__status.is-error { color: var(--wop-red); }

.wop-btn {
	display: inline-block; background: var(--wop-red); color: #fff; border: none;
	padding: 14px 28px; border-radius: 6px; font-family: "ScalaSansPro-Bold", Arial, sans-serif;
	font-weight: normal; text-transform: uppercase; letter-spacing: 1.5px; font-size: 14px;
	cursor: pointer; text-decoration: none;
}
.wop-btn:hover { background: #000; color: #fff; }
.wop-btn--outline { background: transparent; color: var(--wop-red); border: 1px solid var(--wop-red); margin-right: 12px; }
.wop-btn--outline:hover { background: var(--wop-red); color: #fff; }
.wop-btn--small { padding: 9px 18px; font-size: 12px; width: 100%; }
.wop-btn:disabled { background: #ccc; cursor: not-allowed; }
.wop-link-btn { background: none; border: none; color: var(--wop-red); text-decoration: underline; cursor: pointer; font-size: 14px; padding: 0; }

/* ---------------- Account bar ---------------- */
.wop-account-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; padding-bottom: 16px; border-bottom: 1px dashed var(--wop-border); }
.wop-account-bar__brand { font-family: "ScalaSansPro-Bold", Arial, sans-serif; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--wop-heading); }
.wop-account { position: relative; }
.wop-account__toggle { background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-family: inherit; font-size: 15px; color: var(--wop-text); }
.wop-account__dropdown { position: absolute; right: 0; top: 100%; margin-top: 8px; background: #fff; border: 1px solid var(--wop-border); border-radius: 6px; min-width: 160px; box-shadow: 0 6px 18px rgba(0,0,0,.08); z-index: 20; overflow: hidden; }
.wop-account__item { display: block; width: 100%; text-align: left; background: none; border: none; padding: 12px 16px; font-size: 14px; color: var(--wop-text); text-decoration: none; cursor: pointer; }
.wop-account__item:hover { background: var(--wop-bg-soft); }

/* ---------------- Dashboard grid ---------------- */
.wop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .wop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .wop-grid { grid-template-columns: 1fr; } }
.wop-tile {
	background: var(--wop-bg-soft); border: 1px solid var(--wop-border); border-radius: 6px;
	padding: 32px 20px; text-align: center; cursor: pointer; transition: all .2s;
	font-family: "ScalaSansPro-Bold", Arial, sans-serif; font-weight: normal;
	font-size: 15px; letter-spacing: .5px; color: var(--wop-heading); min-height: 140px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.wop-tile:hover { background: var(--wop-red); color: #fff; border-color: var(--wop-red); }
.wop-tile__icon { width: 40px; height: 40px; color: var(--wop-red); transition: color .2s; }
.wop-tile__icon svg { width: 100%; height: 100%; }
.wop-tile:hover .wop-tile__icon { color: #fff; }
.wop-tile__label { line-height: 1.3; }

/* ---------------- Module container ---------------- */
.wop-module { margin-top: 10px; }
.wop-back { background: none; border: none; color: var(--wop-red); cursor: pointer; font-size: 14px; margin-bottom: 20px; padding: 0; }
.wop-panel { }
.wop-rich-text p { margin: 0 0 14px; }
.wop-meta-line { color: #777; font-size: 14px; }

/* Cards (news-style, matches the site's existing article cards) */
.wop-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 10px; }
@media (max-width: 900px) { .wop-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .wop-card-grid { grid-template-columns: 1fr; } }
.wop-card { border: 1px solid var(--wop-border); background: #fff; }
.wop-card__image img { width: 100%; height: 160px; object-fit: cover; display: block; }
.wop-card__body { padding: 20px; }
.wop-card__date { display: block; font-size: 12px; color: var(--wop-red); font-family: "ScalaSansPro-Bold", Arial, sans-serif; letter-spacing: 1px; margin-bottom: 6px; }
.wop-morelink { background: none; border: none; padding: 0; margin-top: 10px; color: var(--wop-red); font-size: 14px; cursor: pointer; }

/* Calendar of Events: table-style rows - small picture, date, title, one line each */
.wop-events-table { border: 1px solid var(--wop-border); background: #fff; margin-bottom: 10px; }
.wop-event-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--wop-border);
	background: none;
	border-left: none;
	border-right: none;
	border-top: none;
	width: 100%;
	text-align: left;
	cursor: pointer;
	transition: background .15s;
}
.wop-events-table .wop-event-row:last-child { border-bottom: none; }
.wop-event-row:hover { background: var(--wop-bg-soft); }
.wop-event-row--head { cursor: default; background: var(--wop-bg-soft); font-family: "ScalaSansPro-Bold", Arial, sans-serif; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: #888; }
.wop-event-row--head:hover { background: var(--wop-bg-soft); }
.wop-event-row__thumb { flex: 0 0 56px; width: 56px; height: 56px; overflow: hidden; border-radius: 4px; background: var(--wop-bg-soft); }
.wop-event-row__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wop-event-row__date { flex: 0 0 110px; font-size: 13px; color: var(--wop-red); font-family: "ScalaSansPro-Bold", Arial, sans-serif; letter-spacing: .5px; }
.wop-event-row__partner { flex: 0 0 160px; font-size: 13px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wop-event-row__title { flex: 1 1 auto; font-size: 15px; color: var(--wop-heading); min-width: 0; }
.wop-event-row__more { flex: 0 0 auto; color: var(--wop-red); font-size: 18px; }
.wop-event-row--head .wop-event-row__date,
.wop-event-row--head .wop-event-row__partner,
.wop-event-row--head .wop-event-row__title { color: inherit; font-size: inherit; }
@media (max-width: 700px) {
	.wop-event-row__partner { display: none; }
}
@media (max-width: 560px) {
	.wop-event-row { flex-wrap: wrap; gap: 8px 12px; }
	.wop-event-row__thumb { flex: 0 0 44px; width: 44px; height: 44px; }
	.wop-event-row__date { flex: 0 0 auto; order: 3; width: 100%; margin-left: 60px; }
	.wop-event-row--head .wop-event-row__thumb { display: none; }
}

.wop-partner-card { padding: 20px; }
.wop-partner-card__logo img { max-height: 60px; width: auto; margin-bottom: 12px; }
.wop-partner-card__meta { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; color: #555; }
.wop-partner-card__meta li { margin-bottom: 4px; }

.wop-orgchart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 700px) { .wop-orgchart-grid { grid-template-columns: 1fr; } }
.wop-orgchart-box { background: var(--wop-bg-soft); border-radius: 6px; padding: 22px; }
.wop-orgchart-diagrams { margin-top: 30px; display: flex; flex-direction: column; gap: 20px; }
.wop-orgchart-diagrams img { width: 100%; height: auto; border: 1px solid var(--wop-border); border-radius: 6px; display: block; }
.wop-doc-list { list-style: none; padding: 0; }
.wop-doc-list li { margin-bottom: 8px; }

/* Bulletin board sticky notes */
.wop-note-board { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.wop-note {
	background: #FFF6D8; border: 1px solid #EBDFA0; box-shadow: 2px 3px 6px rgba(0,0,0,.08);
	padding: 22px 18px; width: 200px; cursor: pointer; transform: rotate(-1deg);
	font-family: "ScalaSansPro-Bold", Arial, sans-serif; font-size: 15px; color: var(--wop-heading);
}
.wop-note:nth-child(3n+1) { transform: rotate(1deg); }
.wop-note:nth-child(3n+2) { transform: rotate(-1.5deg); }
.wop-note:hover { box-shadow: 3px 5px 10px rgba(0,0,0,.14); }
.wop-note__subject { display: block; }
.wop-note__byline {
	display: block; margin-top: 8px; font-family: "ScalaSansPro", Arial, sans-serif;
	font-size: 12px; font-weight: normal; color: var(--wop-text-muted, #777);
}

/* Expandable inline detail panel (events / bulletin) */
.wop-expand { background: var(--wop-bg-soft); border-radius: 6px; padding: 26px; margin: 6px 0 20px; position: relative; }
.wop-expand__close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--wop-heading); }
.wop-photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.wop-photo-grid img { max-width: 180px; height: auto; border-radius: 4px; }

/* ---------------- Profile ---------------- */
.wop-profile-view { display: grid; grid-template-columns: 200px 1fr; row-gap: 12px; margin-bottom: 20px; }
.wop-profile-view dt { font-family: "ScalaSansPro-Bold", Arial, sans-serif; color: var(--wop-heading); font-size: 13px; letter-spacing: .5px; }
.wop-profile-view dd { margin: 0; }

/* ---------------- Chat ---------------- */
.wop-chat { display: grid; grid-template-columns: 240px 1fr; gap: 24px; min-height: 480px; }
@media (max-width: 700px) { .wop-chat { grid-template-columns: 1fr; } }
.wop-chat__sidebar { border-right: 1px solid var(--wop-border); padding-right: 20px; }
@media (max-width: 700px) { .wop-chat__sidebar { border-right: none; border-bottom: 1px solid var(--wop-border); padding-right: 0; padding-bottom: 16px; } }
.wop-chat__sidebar h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #999; margin: 20px 0 8px; }
.wop-chat__contact { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 4px; padding: 10px 12px; cursor: pointer; font-size: 14px; color: var(--wop-text); }
.wop-chat__contact.is-active, .wop-chat__contact:hover { background: var(--wop-red); color: #fff; }
.wop-chat__contact .wop-chat__group-badge { display: inline-block; margin-left: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #999; }
.wop-chat__contact.is-active .wop-chat__group-badge, .wop-chat__contact:hover .wop-chat__group-badge { color: rgba(255,255,255,.75); }
.wop-chat__threads { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }

/* "Start a new conversation" partner checklist (replaces the old single-select dropdown, so a thread can be started with more than one person) */
.wop-chat__partners { max-height: 220px; overflow-y: auto; border: 1px solid var(--wop-border); border-radius: 4px; padding: 6px 10px; margin-bottom: 10px; }
.wop-chat__partner { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; cursor: pointer; }
.wop-chat__partner input { margin: 0; cursor: pointer; }
.wop-chat__partner span { cursor: pointer; }

.wop-chat__main { display: flex; flex-direction: column; }
.wop-chat__retention-notice { font-size: 12px; color: #999; margin: 0 0 10px; }
.wop-chat__messages { flex: 1; overflow-y: auto; max-height: 420px; border: 1px solid var(--wop-border); border-radius: 6px; padding: 16px; background: #fafafa; margin-bottom: 12px; }
.wop-chat-msg { margin-bottom: 14px; }
.wop-chat-msg__meta { font-size: 12px; color: #999; margin-bottom: 2px; }
.wop-chat-msg__author { font-family: "ScalaSansPro-Bold", Arial, sans-serif; color: var(--wop-heading); }
.wop-chat-msg__text { white-space: pre-wrap; word-break: break-word; }
.wop-chat-msg.is-own .wop-chat-msg__text { color: var(--wop-red); }
.wop-chat__form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.wop-chat__form textarea { width: 100%; padding: 10px; border: 1px solid var(--wop-border); border-radius: 4px; font-family: inherit; resize: vertical; }

.wop-empty-state { color: #999; font-size: 14px; padding: 20px 0; }

/* EU/Interreg funding acknowledgement, centered, bottom of every screen */
.wop-footer-credit {
	text-align: center;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--wop-border);
}
.wop-footer-credit img { max-width: 280px; width: 100%; height: auto; display: inline-block; margin-bottom: 12px; }
.wop-footer-credit p {
	max-width: 640px;
	margin: 0 auto;
	font-size: 13px;
	line-height: 1.5;
	color: #777;
}
