/* ==========================================================================
   1. Основні змінні та скидання стилів
   ================================================================---------- */
:root {
    --primary-color: #215068;         /* Темно-синій бренд-колір сайту */
    --primary-hover: #163748;
    --primary-light: #eef6f9;
    --accent-blue: #2563eb;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Виправлення посилань (без червоного кольору та з високою специфічністю) */
#controller_wrap a,
.field .value a,
#information a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

#controller_wrap a:hover,
.field .value a:hover,
#information a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   2. Шапка профілю (#user_profile_header)
   ================================================================---------- */
#user_profile_header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

#user_profile_title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

@media (min-width: 640px) {
    #user_profile_title {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }
}

#user_profile_title .avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-light);
    flex-shrink: 0;
}

#user_profile_title .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#user_profile_title .name h1 {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: var(--text-main);
}

#user_profile_title sup .online {
    background: #dcfce7;
    color: #15803d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #bbf7d0;
}

/* Репутація та рейтинг */
#user_profile_rates, 
#user_profile_ratings {
    display: inline-block;
    vertical-align: middle;
}

#user_profile_rates .block,
#user_profile_ratings .block {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.user_ratings_hint {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Статус користувача */
#user_status_widget {
    margin-top: 15px;
}

#user_status_widget input.input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    font-size: 0.875rem;
    box-sizing: border-box;
}

#user_status_widget input.input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary-color);
}

/* ==========================================================================
   3. Вкладки меню (#user_profile_tabs)
   ================================================================---------- */
#user_profile_tabs {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.tabs-menu .mobile_menu_select {
    display: none; /* Приховуємо селект для мобільних */
}

ul#menu.tabbed {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

ul#menu.tabbed li a.item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted) !important;
}

ul#menu.tabbed li.active a.item {
    background: var(--primary-color);
    color: #ffffff !important;
    border-color: var(--primary-color);
}

ul#menu.tabbed li a.item:hover {
    background: #e2e8f0;
}

ul#menu.tabbed li.active a.item:hover {
    background: var(--primary-hover);
}

ul#menu.tabbed .counter {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================================================
   4. Двоколонкова сітка (#user_profile)
   ================================================================---------- */
#user_profile {
    display: grid;
   
    gap: 20px;
   grid-template-columns: 260px 1fr; /* Перша колонка рівно 260px, друга займає решту місця */
    gap: 20px;
}

/* Загальний стиль блоків у колонках */
.column .block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

/* 4.1. Виправлення фотографія (не на всю ширину) */
#left_column #avatar.block {
    text-align: center;
}

#left_column #avatar img.img-thumbnail {
 
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin: 0 auto;
    display: block;
}

/* 4.2. Блок меню дій (Завантажити фото / Редагувати) */
.column .block ul.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column .block ul.menu li a {
    display: block;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main) !important;
    text-align: center;
}

.column .block ul.menu li a:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
}

/* 4.3. Інформація та реєстрація */
ul.details, ul.content_counts {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

ul.details li {
    margin-bottom: 6px;
}

ul.content_counts a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

ul.content_counts .counter {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

/* 4.4. Блок Друзів (.friends-list) */
.block-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.friends-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.friends-list span[itemprop="knows"] {
    display: inline-block;
}

.friends-list img.img-thumbnail {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important; /* Круглі міні-аватарки */
    object-fit: cover;
    border: 2px solid #f1f5f9;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.friends-list img.img-thumbnail:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

/* ==========================================================================
   5. Права колонка з даними (#information)
   ================================================================---------- */
#information.content_item {
    padding: 20px;
}

#information .fieldset {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

#information .fieldset:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

@media (min-width: 480px) {
    .field {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.field .title {
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 150px;
}

.field .value {
    color: var(--text-main);
    font-weight: 500;
}

/* Теги цілей знакомств */
ul.multiple_tags_list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.multiple_tags_list li a {
     display: block;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #15803d !important;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

ul.multiple_tags_list li a:hover {
   background: #dcfce7;
    border-color: #86efac;
    color: #14532d !important;
}

/* ==========================================================================
   6. Стена користувача (#user_profile_wall)
   ================================================================---------- */
#user_profile_wall {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--shadow-sm);
}

#wall_widget .title_bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

#wall_widget .title_bar .title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

#wall_add_form {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
}

.markItUpContainer {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
}

.markitup_redactor {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: none;
    box-sizing: border-box;
}

#wall_add_form .buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

#wall_add_form .btn {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
}

#wall_add_form .btn:hover {
    background: #f1f5f9;
}