/* =====================================
   SOCIAL LOGIN BUTTONS
===================================== */


.social-login-buttons {
    margin-top: 15px;
}


.social-btn {
    display: block !important;
    width: 100% !important;
    padding: 14px !important;
    border-radius: 10px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-weight: bold !important;
    color: #fff !important;
    margin-bottom: 10px !important;
}

.google {
    background: #4285F4 !important;
}

.facebook {
    background: #1877F2 !important;
}


/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-top: #fff6e9;
    --bg-bottom: #dff7f1;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --text: #2d3a35;
    --muted: #5d6f68;
    --primary: #2da77a;
    --primary-dark: #22805e;
    --accent: #ffb874;
    --accent-soft: #ffe2c3;
    --danger: #cc4f4f;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow: 0 12px 30px rgba(45, 90, 74, 0.16);
    --content-max-width: 1500px;
}

/* ===== CONTAINER ===== */
.container {
    width: min(95%, var(--content-max-width));
    margin: 0 auto;
}

h1,
h2,
h3 {
    font-family: 'Baloo 2', cursive;
    color: #264a3f;
    letter-spacing: 0.3px;
    line-height: 1.18;
    margin-bottom: 0.45rem;
}

h4 {
    font-family: 'Baloo 2', cursive;
    color: #234b3f;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

p,
label,
input,
textarea,
button,
a {
    font-family: 'Nunito', sans-serif;
}

p {
    color: var(--text);
}

.hero-card {
    background: linear-gradient(140deg, var(--surface-strong), var(--accent-soft));
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 3vw, 2rem);
    box-shadow: var(--shadow);
    margin-bottom: 1.4rem;
}

.hero-card p {
    margin-top: 0.45rem;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.button-link {
    display: inline-block;
    text-decoration: none;
    background: var(--primary);
    color: #fff;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
}

.button-link:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.button-link.ghost {
    background: rgba(255, 255, 255, 0.78);
    color: #255e4d;
    border: 1px solid #9fd3bf;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--surface-strong);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid #e8f3ed;
    box-shadow: 0 8px 20px rgba(58, 109, 90, 0.1);
}

.feature-card p {
    margin-top: 0.4rem;
    color: var(--muted);
}

.alert-error {
    background: #ffe7e7;
    color: #8a2f2f;
    border: 1px solid #f3b8b8;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.8rem;
}

.alert-success {
    background: #e6faef;
    color: #1f6a47;
    border: 1px solid #bfe9d0;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.8rem;
}

.chat-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1rem;
}

.chat-panel {
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    border: 1px solid #e6efe9;
    box-shadow: var(--shadow);
    padding: clamp(1rem, 1.4vw, 1.35rem);
}

.chat-form {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.35rem;
}

.chat-form button,
.chat-form .button-link {
    margin-top: 0.3rem;
}

.chat-hint {
    margin-top: 0.8rem;
    color: var(--muted);
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.4rem;
}

.message-item {
    background: #f8fffc;
    border: 1px solid #ddeee7;
    border-radius: 12px;
    padding: 0.7rem;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
    color: #4f6a61;
    margin-bottom: 0.4rem;
}

.message-meta span {
    font-size: 0.84rem;
    color: #759286;
}

.chat-user-link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    color: #1e6d53;
    text-decoration: none;
    font-weight: 800;
}

.chat-user-link:hover {
    color: #165742;
}

.profile-preview-card {
    margin-top: 0.45rem;
    width: min(100%, 320px);
    background: #ffffff;
    border: 1px solid #d8e9e1;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(33, 80, 64, 0.2);
    padding: 0.7rem;
    display: none;
    align-items: flex-start;
    gap: 0.6rem;
}

.chat-user-link:hover .profile-preview-card,
.chat-user-link:focus .profile-preview-card,
.chat-user-link:focus-within .profile-preview-card {
    display: flex;
}

.profile-preview-photo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #d3e6dd;
    flex: 0 0 auto;
}

.profile-preview-content {
    display: grid;
    gap: 0.12rem;
}

.profile-preview-placeholder {
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    background: #effaf4;
    color: #3d6f5e;
}

.profile-preview-name {
    display: block;
    color: #1e5c49;
    font-size: 0.95rem;
    font-weight: 700;
}

.profile-preview-age {
    display: block;
    color: #2f5e50;
    font-size: 0.82rem;
    font-weight: 700;
}

.profile-preview-hint {
    display: block;
    color: #5f7f73;
    font-size: 0.8rem;
}

.profile-preview-mail {
    color: #507467;
    font-size: 0.82rem;
    font-weight: 600;
    word-break: break-word;
}

.chat-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.chat-group-card {
    background: var(--surface-strong);
    border-radius: var(--radius-md);
    border: 1px solid #dcebe4;
    box-shadow: var(--shadow);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.group-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.chat-room-grid {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(280px, 1.3fr);
    gap: 1rem;
}

.forum-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.forum-toolbar {
    margin-bottom: 1rem;
}

.forum-create-dropdown {
    padding: 0.9rem 1rem;
}

.forum-create-dropdown summary {
    list-style: none;
    cursor: pointer;
    font-family: 'Baloo 2', cursive;
    font-size: 1.18rem;
    color: #1f5b48;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forum-create-dropdown summary::-webkit-details-marker {
    display: none;
}

.forum-create-dropdown summary::after {
    content: '+';
    font-size: 1.4rem;
    line-height: 1;
    color: #2a8b69;
}

.forum-create-dropdown[open] summary::after {
    content: '−';
}

.forum-create-dropdown .chat-form {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #cde4d9;
}

.forum-edit-panel {
    margin-bottom: 1rem;
}

.forum-composer,
.forum-topics,
.forum-thread {
    background: linear-gradient(180deg, #ffffff 0%, #f8fffc 100%);
}

.forum-composer textarea,
.forum-reply-form textarea {
    min-height: 130px;
    line-height: 1.55;
}

.forum-topic-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.forum-topic-item {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid #d7ece2;
    background: #fbfffd;
}

.forum-topics-stream {
    margin-bottom: 1rem;
}

.forum-topic-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: flex-start;
}

.forum-topic-head h4 {
    margin-bottom: 0.24rem;
    font-size: clamp(1.34rem, 2.3vw, 1.92rem);
    line-height: 1.16;
    letter-spacing: 0.2px;
    color: #1f4f8a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
    border-left: 4px solid #8ebeff;
    padding-left: 0.5rem;
    text-wrap: balance;
}

.forum-topics>h3,
.forum-thread>h3 {
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    letter-spacing: 0.2px;
    color: #174b3b;
}

.forum-open-button {
    background: linear-gradient(140deg, #23a26f, #1f8760);
    color: #ffffff;
    border: 1px solid #176348;
    box-shadow: 0 10px 22px rgba(31, 135, 96, 0.28);
}

.forum-open-button:hover {
    background: linear-gradient(140deg, #2bb47c, #1f8c64);
    color: #ffffff;
    border-color: #15563f;
    box-shadow: 0 14px 28px rgba(31, 135, 96, 0.34);
}

.forum-topic-head .profile-help {
    margin-top: 0.2rem;
}

.forum-reply-count {
    display: inline-block;
    background: #eef9f4;
    color: #2f6752;
    border: 1px solid #c9e7db;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.forum-author-link {
    color: #1f6b52;
    font-weight: 800;
    text-decoration: none;
    border-bottom: 1px dashed #95cab5;
}

.forum-author-link:hover {
    color: #155340;
    border-bottom-color: #5ea389;
}

.forum-topic-content,
.forum-reply-content {
    line-height: 1.7;
    color: #2d463d;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.forum-topic-content {
    background: #f6fdf9;
    border: 1px solid #dcefe6;
    border-radius: 10px;
    padding: 1rem 1.05rem;
    font-size: 1.03rem;
}

.forum-topic-image {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid #d9ebe3;
    background: linear-gradient(180deg, #f4fbf7 0%, #ecf8f2 100%);
    padding: 0.35rem;
    margin-top: 0.2rem;
}

.forum-topic-item .hero-actions {
    margin-top: 0.2rem;
    gap: 0.55rem;
}

.forum-thread {
    margin-top: 1.1rem;
}

.forum-thread {
    margin-top: 1rem;
}

.forum-thread-top-actions {
    margin-top: 0.55rem;
    margin-bottom: 0.95rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed #cde4d9;
}

.forum-reply-list {
    max-height: none;
    overflow: visible;
    margin-bottom: 0.8rem;
}

.forum-reply-item {
    border-radius: 14px;
    border-width: 1px;
    border-style: solid;
    padding: 0.95rem;
    border-left: 6px solid rgba(66, 109, 93, 0.35);
}

.forum-reply-item .forum-topic-content {
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(49, 84, 70, 0.2);
}

.forum-reply-edit-form {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px dashed #bdd9cb;
}

.forum-reply-actions {
    margin-top: 0.7rem;
    gap: 0.55rem;
    align-items: stretch;
}

.forum-action-button {
    min-height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    padding: 0.7rem 1.15rem;
}

.forum-action-danger {
    min-height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.15rem;
    line-height: 1.1;
}

.forum-reply-actions form {
    margin: 0;
}

.forum-reply-actions form .danger-button {
    min-height: 2.65rem;
}

.forum-color-panel {
    margin-top: 1rem;
    border: 1px solid #d7eade;
    background: linear-gradient(180deg, #ffffff 0%, #f6fcf9 100%);
}

.chat-message-item {
    border-left: 6px solid rgba(58, 104, 86, 0.35);
}

.forum-reply-submit-actions {
    gap: 0.6rem;
    align-items: stretch;
}

.forum-reply-submit,
.forum-reply-back {
    min-height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1.2rem;
}

.blocked-contacts-panel {
    margin-top: 1rem;
}

.blocked-contacts-list {
    max-height: none;
    overflow: visible;
}

.blocked-contact-item {
    background: #fff6f6;
    border: 1px solid #e8c7c7;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 46, 39, 0.48);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 999;
}

.modal-overlay.is-open {
    display: flex;
}

.modal-card {
    width: min(96vw, 700px);
    max-height: 84vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #cfe5da;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(26, 58, 47, 0.26);
    padding: 1rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.65rem;
}

.profile-color-settings {
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #cde4d9;
}

.profile-color-preview-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.55rem;
}

.profile-color-preview {
    width: 120px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #bcd8ca;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.profile-rgb-grid {
    display: grid;
    grid-template-columns: 28px minmax(72px, 1fr) 28px minmax(72px, 1fr) 28px minmax(72px, 1fr);
    gap: 0.5rem;
    align-items: center;
    margin: 0.45rem 0 0.85rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.members-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 1rem;
}

.members-sidebar {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.members-results {
    display: grid;
    gap: 1rem;
    margin-top: 1.8rem;
}

.members-results--few .member-results-slider {
    gap: 1.1rem;
}

.members-results--many .member-results-slider {
    gap: 0.9rem;
}

.members-results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    background: var(--surface-strong);
    border-radius: var(--radius-md);
    border: 1px solid #dcebe4;
    box-shadow: var(--shadow);
    padding: 1rem;
}

.members-results-header h3 {
    margin-bottom: 0.2rem;
}

.members-results-header p {
    color: var(--muted);
}

.members-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.members-summary-box {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #d8ebe2;
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    display: grid;
    gap: 0.2rem;
}

.members-summary-box strong {
    font-size: 1.15rem;
    color: #245547;
}

.members-summary-box span {
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-card p {
    margin-top: 0.5rem;
}

.profile-help {
    color: #53756a;
    font-size: 0.95rem;
}

.profile-warning {
    background: #fff7df;
    border: 1px solid #f0ddb0;
    color: #7c6429;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    margin: 0.6rem 0 0.8rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0.6rem 0 0.85rem;
    color: #2f4e43;
    background: #f3fbf7;
    border: 1px solid #cde8dc;
    border-radius: 12px;
    padding: 0.6rem 0.7rem;
    font-weight: 700;
    line-height: 1.35;
}

.checkbox-label input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.1rem;
    flex: 0 0 auto;
    cursor: pointer;
}

.checkbox-label:hover {
    border-color: #94d3bd;
    background: #ebf8f2;
}

.danger-button {
    background: #cc4f4f;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.danger-button:hover {
    background: #b93b3b;
    transform: translateY(-1px);
}

.profile-photo {
    width: min(100%, 260px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    margin-bottom: 0.8rem;
    border: 2px solid #d3ebdf;
}

.profile-photo-placeholder {
    display: grid;
    place-items: center;
    background: #f3fbf7;
    color: #5b7a6f;
    font-weight: 700;
}

.members-filter-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: end;
}

.members-filter-form select,
.members-filter-form input {
    width: 100%;
}

.members-filter-field {
    grid-column: span 4;
    display: grid;
    gap: 0.4rem;
}

.members-filter-field--wide {
    grid-column: span 12;
}

.members-filter-actions {
    grid-column: span 12;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    margin-top: 0.25rem;
}

.members-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.5rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    background: #eefaf4;
    border: 1px solid #cfe8db;
    color: #2e6553;
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.member-results-slider {
    display: flex;
    gap: 1.6rem;
    overflow-x: auto;
    padding: 0.4rem 0 0.95rem;
    scroll-snap-type: x proximity;
}

.member-results-slider::-webkit-scrollbar {
    height: 10px;
}

.member-results-slider::-webkit-scrollbar-thumb {
    background: #c8e3d7;
    border-radius: 999px;
}

.member-card {
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    border: 1px solid #dcebe4;
    box-shadow: var(--shadow);
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
    flex: 0 0 260px;
    scroll-snap-align: start;
}

.member-card-header {
    display: grid;
    grid-template-columns: minmax(96px, 112px) 1fr;
    align-items: center;
    gap: 0.8rem;
}

.member-card-header .member-photo {
    margin-bottom: 0;
}

.member-card-info h4 {
    font-family: 'Baloo 2', cursive;
    color: #264a3f;
    font-size: 1.25rem;
    line-height: 1.1;
}

.member-card-meta {
    display: grid;
    gap: 0.45rem;
}

.member-card-meta--compact {
    gap: 0;
}

.member-meta-item {
    display: block;
    color: #39584f;
    background: #f7fcfa;
    border: 1px solid #e2f0ea;
    border-radius: 12px;
    padding: 0.6rem 0.7rem;
    line-height: 1.35;
}

.member-meta-item--age {
    text-align: center;
    font-weight: 800;
}

.member-card-footer {
    display: flex;
    justify-content: flex-start;
}

.profile-view-button {
    display: inline-flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 20px rgba(45, 167, 122, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease, font-size 0.2s ease;
}

.profile-view-button:hover {
    box-shadow: 0 14px 24px rgba(45, 167, 122, 0.22);
}

.profile-view-button--few {
    padding: 1rem 1.35rem;
    font-size: 1.05rem;
    font-weight: 800;
    border-width: 2px;
}

.profile-view-button--medium {
    padding: 0.88rem 1.1rem;
    font-size: 1rem;
    font-weight: 800;
}

.profile-view-button--many {
    padding: 0.72rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.members-results {
    margin-top: 1.2rem;
}

.members-results-header {
    margin-bottom: 0.2rem;
}

.member-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 0.85rem;
    border: 2px solid #d3ebdf;
}

.member-photo-placeholder {
    display: grid;
    place-items: center;
    background: #f3fbf7;
    color: #5b7a6f;
    font-weight: 800;
    font-size: 2rem;
}

.profile-save-button {
    margin-top: 0.65rem;
    min-height: 2.75rem;
    padding: 0.78rem 1.35rem;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(45, 167, 122, 0.2);
}

.profile-save-button:hover {
    box-shadow: 0 14px 24px rgba(45, 167, 122, 0.24);
}