﻿/* 
 * Component styles for Telegram Mini App 
 * File contains reusable UI components that are not tied to specific pages
 */

/* VARIABLES AND THEME SETTINGS */
:root {
    /* Telegram-specific variables with better fallbacks */
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #000000;
    --tg-theme-hint-color: #999999;
    --tg-theme-link-color: #2481cc;
    --tg-theme-button-color: #40a7e3;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f4f4f5;
    
    /* App variables, using Telegram variables */
    --app-bg-color: var(--tg-theme-bg-color);
    --app-text-color: var(--tg-theme-text-color);
    --app-hint-color: var(--tg-theme-hint-color);
    --app-link-color: var(--tg-theme-link-color);
    --app-button-color: var(--tg-theme-button-color);
    --app-button-text-color: var(--tg-theme-button-text-color);
    --app-secondary-bg-color: var(--tg-theme-secondary-bg-color);
    
    /* Custom theme variables */
    --app-card-bg-color: var(--tg-theme-secondary-bg-color);
    --app-border-color: rgba(0, 0, 0, 0.08);
    --app-secondary-text-color: var(--tg-theme-hint-color);
    --app-highlight-color: var(--tg-theme-secondary-bg-color);
    --app-danger-color: #eb4a4a;
    --app-success-color: #31b545;
    --app-warning-color: #ffa900;
    --app-secondary-button-color: rgba(0, 0, 0, 0.06);
    

}

/* Dark theme overrides */
html.dark-theme {
    /* Dark theme variables */
    --tg-theme-bg-color: #212121;
    --tg-theme-text-color: #ffffff;
    --tg-theme-hint-color: #aaaaaa;
    --tg-theme-link-color: #64b5f6;
    --tg-theme-button-color: #40a7e3;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #0f0f0f;
    
    /* Update app variables for dark theme */
    --app-bg-color: var(--tg-theme-bg-color);
    --app-text-color: var(--tg-theme-text-color);
    --app-hint-color: var(--tg-theme-hint-color);
    --app-link-color: var(--tg-theme-link-color);
    --app-button-color: var(--tg-theme-button-color);
    --app-button-text-color: var(--tg-theme-button-text-color);
    --app-secondary-bg-color: var(--tg-theme-secondary-bg-color);
    
    /* Custom dark theme variables */
    --app-card-bg-color: #2c2c2c;
    --app-border-color: rgba(255, 255, 255, 0.08);
    --app-secondary-text-color: var(--tg-theme-hint-color);
    --app-highlight-color: #2c2c2c;
    --app-secondary-button-color: rgba(255, 255, 255, 0.08);
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--app-bg-color);
    color: var(--app-text-color);
    font-family: system-ui, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    font-size: 17px;
    overscroll-behavior-y: contain;
    min-height: 100vh;
    padding-top: 56px !important;
}

/* Welcome page specific - remove top padding */
body.welcome-page {
    padding-top: 0 !important;
}

/* CONTAINERS */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

.main-container {
    min-height: 100vh;
    padding: 16px;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    color: var(--app-text-color);
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--app-text-color);
}

.header-container {
    margin-bottom: 20px;
}

.header-container .page-title {
    margin-bottom: 0;
}

/* BUTTONS */
.primary-button,
.secondary-button,
.danger-button {
    padding: 12px 18px;
    border-radius: 8px;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-height: 46px; /* Increased for better touch targets */
    touch-action: manipulation;
}

/* Navigation states */
.navigating {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.navigating .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes navigation-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Button states during navigation */
button.navigating,
a.navigating,
[data-navigate].navigating {
    opacity: 0.6;
    transform: scale(0.98);
    cursor: wait;
    pointer-events: none;
}

/* Prevent multiple clicks on navigation elements */
button[onclick]:active,
a[onclick]:active,
[data-navigate]:active {
    transform: scale(0.95);
}

/* Enhanced visual feedback for navigation buttons */
.nav-btn-header,
.menu-item-small,
.modern-menu-item,
.plan-action-btn,
.nav-btn {
    position: relative;
    overflow: hidden;
}

.nav-btn-header.navigating,
.menu-item-small.navigating,
.modern-menu-item.navigating,
.plan-action-btn.navigating,
.nav-btn.navigating {
    opacity: 0.6;
    transform: scale(0.98);
}

/* Ripple effect for better touch feedback */
.nav-btn-header::after,
.menu-item-small::after,
.modern-menu-item::after,
.plan-action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    pointer-events: none;
}

.nav-btn-header:active::after,
.menu-item-small:active::after,
.modern-menu-item:active::after,
.plan-action-btn:active::after {
    width: 100px;
    height: 100px;
}

.primary-button {
    background-color: var(--app-button-color);
    color: var(--app-button-text-color);
}

.primary-button:hover, .primary-button:active {
    background-color: var(--app-button-color);
    color: var(--app-button-text-color);
    opacity: 0.9;
    transform: translateY(1px);
}

.secondary-button {
    background-color: var(--app-secondary-button-color);
    color: var(--app-text-color);
}

.secondary-button:hover, .secondary-button:active {
    opacity: 0.8;
    transform: translateY(1px);
}

.danger-button {
    background-color: var(--app-danger-color);
    color: white;
}

.danger-button:hover, .danger-button:active {
    opacity: 0.9;
    transform: translateY(1px);
}

.back-button {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    background-color: var(--app-secondary-button-color);
    color: var(--app-text-color);
    font-size: 1.0rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    touch-action: manipulation;
}

.back-button:hover, .back-button:active {
    opacity: 0.8;
    transform: translateY(1px);
}

.success-button {
    background-color: var(--app-success-color);
    color: var(--app-text-color);
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    font-size: 1.0rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    touch-action: manipulation;
}

.success-button:hover, .success-button:active {
    opacity: 0.9;
    transform: translateY(1px);
}

.warning-button {
    background-color: var(--app-warning-color);
    color: var(--app-text-color);
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    font-size: 1.0rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    touch-action: manipulation;
}

.warning-button:hover, .warning-button:active {
    opacity: 0.9;
    transform: translateY(1px);
}

/* FORMS */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.05rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: #40a7e3;
    outline: none;
}

/* CHECKBOXES - Unified styles */
.checkbox-label,
.checkbox-label-modern,
.checkbox-label-simple {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"],
.checkbox-label-modern input[type="checkbox"],
.checkbox-label-simple input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--tg-theme-hint-color, #707579);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked,
.checkbox-label-modern input[type="checkbox"]:checked,
.checkbox-label-simple input[type="checkbox"]:checked {
    background: var(--tg-theme-button-color, #40a7e3);
    border-color: var(--tg-theme-button-color, #40a7e3);
}

.checkbox-label input[type="checkbox"]:checked::after,
.checkbox-label-modern input[type="checkbox"]:checked::after,
.checkbox-label-simple input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label span,
.checkbox-label-modern span,
.checkbox-label-simple span {
    color: var(--app-text-color);
    font-size: 1.0rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.checkbox-label:hover span,
.checkbox-label-modern:hover span,
.checkbox-label-simple:hover span {
    color: var(--tg-theme-text-color, #333);
}

/* Form checkbox group styling */
.checkbox-group .checkbox-label {
    margin-bottom: 12px;
}

/* Compatibility with existing modern checkbox styles */
.checkbox-label-modern {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.checkbox-label-modern input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--tg-theme-hint-color, #707579);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
    transition: all 0.2s ease;
}

.checkbox-label-modern input[type="checkbox"]:checked {
    background: var(--tg-theme-button-color, #40a7e3);
    border-color: var(--tg-theme-button-color, #40a7e3);
}

.checkbox-label-modern input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label-modern span {
    color: var(--tg-theme-hint-color, #707579);
    font-size: 1.0rem;
    transition: color 0.2s ease;
}

.checkbox-label-modern input[type="checkbox"]:checked + span {
    color: var(--tg-theme-text-color, #000000);
}

.checkbox-label-modern:hover span {
    color: var(--tg-theme-text-color, #000000);
}

/* Simple checkbox styles */
.checkbox-label-simple {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.checkbox-label-simple input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--tg-theme-hint-color, #707579);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
    transition: all 0.2s ease;
}

.checkbox-label-simple input[type="checkbox"]:checked {
    background: var(--tg-theme-button-color, #40a7e3);
    border-color: var(--tg-theme-button-color, #40a7e3);
}

.checkbox-label-simple input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label-simple span {
    color: var(--tg-theme-hint-color, #707579);
    font-size: 1.0rem;
    transition: color 0.2s ease;
}

.checkbox-label-simple input[type="checkbox"]:checked + span {
    color: var(--tg-theme-text-color, #000000);
}

.checkbox-label-simple:hover span {
    color: var(--tg-theme-text-color, #000000);
}

/* LOADING/ERROR STATES */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    min-height: 200px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--app-button-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Красивое оформление страницы ошибки */
.error-container {
    max-width: 400px;
    margin: 40px auto;
    background: #fff4f4;
    border-radius: 16px;
    padding: 32px 20px 24px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.error-code {
    font-size: 2.2rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 8px;
}

.error-message {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
}

.error-container p {
    color: #b94a48;
    margin-bottom: 18px;
    font-size: 1rem;
}

.mt-4 {
    margin-top: 1.5rem !important;
    display: flex;
    gap: 12px;
    justify-content: center;
}

@media (max-width: 500px) {
    .error-container {
        max-width: 98vw;
        padding: 18px 4vw 16px 4vw;
    }
    .error-code {
        font-size: 1.5rem;
    }
    .error-message {
        font-size: 1.05rem;
    }
    .mt-4 {
        flex-direction: column;
        gap: 8px;
    }
}

/* CARDS */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    margin-bottom: 18px;
}
.card h3, .card h4 {
    margin-top: 0;
}
.card .btn-group {
    gap: 6px;
}
#photosGallery {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
#photosGallery .img-thumbnail {
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-right: 8px;
    margin-bottom: 4px;
}
#photosGallery .d-flex {
    gap: 16px;
}
.table-sm {
    font-size: 0.97rem;
}
@media (max-width: 600px) {
    .card { padding: 10px; }
    #photosGallery .img-thumbnail { max-width: 80px; }
}

/* Add client */
.invite-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.invite-link {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    word-break: break-all;
}
.steps {
    margin-top: 30px;
}
.step {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}
.alert {
    display: none;
    margin-top: 10px;
}

/* UTILITY CLASSES */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-end {
    justify-content: flex-end !important;
}

.ms-auto {
    margin-left: auto !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

/* RESPONSIVE ADJUSTMENTS */
@media screen and (max-width: 480px) {
    body {
        font-size: 16px;
    }
    
    .container, .dashboard-container {
        padding: 12px;
    }
    
    .page-title {
        font-size: 2.0rem;
    }
    
    .primary-button, 
    .secondary-button,
    .danger-button {
        padding: 10px 16px;
        font-size: 1rem;
    }
    
    .back-button {
        padding: 8px 12px;
        font-size: 1.0rem;
    }
}

@media screen and (max-width: 360px) {
    .container, .dashboard-container {
        padding: 10px;
    }
    
    .card {
        padding: 12px;
    }
}

/* EDIT WORKOUT PLAN & MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background-color: var(--tg-theme-bg-color, #fff);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--tg-theme-hint-color, #ddd);
}

.modal-header h3 {
    margin: 0;
    color: var(--tg-theme-text-color, #000);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--tg-theme-hint-color, #999);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.modal-close-btn:hover {
    color: var(--tg-theme-text-color, #000);
}

.btn-success-modern {
    width: 100%;
    padding: 12px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-success-modern:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* SAVING OVERLAY */
.saving-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.saving-overlay .saving-message {
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
    padding: 20px 30px;
    margin: 0 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
}

/* DISABLED BUTTON STATES */
#saveWorkoutPlanBtn:disabled,
#copyWorkoutPlanBtn:disabled,
#saveButton:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* EDIT NUTRITION PLAN SPECIFIC STYLES */
#saveButton {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.btn-primary .spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

/* Telegram Mini App specific fixes */
.tg-app-fix {
    /* Removed position: fixed and related properties to allow normal scrolling */
    background-color: var(--app-bg-color);
    /* You can add padding/margin if needed for safe area insets */
}

/* @media screen and (min-device-pixel-ratio:0) { 
    select,
    textarea,
    input {
        font-size: 16px !important;
    }
} */

.file-preview #fileActions {
    gap: 10px;
    margin-bottom: 8px;
}
.file-preview #fileActions .primary-button {
    background-color: var(--app-success-color, #28a745);
    color: #fff;
    border: none;
}
.file-preview #fileActions .primary-button:hover, .file-preview #fileActions .primary-button:active {
    opacity: 0.9;
    background-color: #218838;
}
.file-preview #fileActions .danger-button {
    background-color: var(--app-danger-color, #dc3545);
    color: #fff;
    border: none;
}
.file-preview #fileActions .danger-button:hover, .file-preview #fileActions .danger-button:active {
    opacity: 0.9;
    background-color: #b52a37;
}

.file-upload-area-empty {
    border: 2px dashed var(--tg-theme-section-separator-color, #e1e5e9);
    border-radius: 16px;
    background: var(--app-highlight-color, #f8f9fa);
    transition: border-color 0.2s;
}

.file-name-ellipsis {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: bottom;
}

label.form-section-label {
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--app-text-color);
    margin-bottom: 12px;
    display: block;
} 

label.form-section-label-small {
    font-weight: 600;
    font-size: 1.04rem;
    color: var(--app-text-color);
    margin-bottom: 12px;
    display: block;
} 

.client-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 18px 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid #f0f0f0;
}
.client-card:hover, .client-card:focus {
    box-shadow: 0 4px 20px rgba(0,0,0,0.13);
    transform: translateY(-2px) scale(1.01);
    border-color: #40a7e3;
}
.client-info {
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}
.client-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #40a7e3;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    flex-shrink: 0;
}
.client-main-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.client-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.client-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
}
.client-meta {
    font-size: 1.02rem;
    color: #888;
    margin-top: 2px;
}
.message-btn {
    background: var(--tg-theme-button-color, #40a7e3);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 16px;
    padding: 12px 20px;
    font-size: 1.0rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.message-btn:hover {
    background: #2d8bc8;
    transform: translateY(-1px);
}

/* Планы */
.plans-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plan-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: all 0.2s ease;
}

.plan-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* plan-card-modern moved to trainer.css - removed duplicate */

/* Photo gallery styles */
.photo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.photo-row > div:first-child {
    min-width: 80px;
    font-weight: 500;
    color: var(--app-text-color);
}

.img-thumbnail {
    border-radius: 8px;
    border: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
    object-fit: cover;
}

/* Chart container styles */
canvas {
    max-width: 100%;
    height: auto !important;
}

/* Circular message button styles */
.message-button-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #40a7e3;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(64, 167, 227, 0.3);
    flex-shrink: 0;
    font-size: 1.1rem;
}

.message-button-circle:hover {
    background: #2d8bc8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(64, 167, 227, 0.4);
}

.message-button-circle:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(64, 167, 227, 0.3);
}

.message-button-circle i {
    font-size: 1.1rem;
    line-height: 1;
}

/* Smaller variant for card actions */
.message-button-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tg-theme-button-color, #40a7e3);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.0rem;
    box-shadow: 0 2px 8px rgba(64, 167, 227, 0.3);
    margin-left: auto;
    touch-action: manipulation;

}

.message-button-small:hover {
    background: #2d8bc8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(64, 167, 227, 0.4);
}

.message-button-small:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(64, 167, 227, 0.3);
}

.message-button-small i {
    font-size: 1.0rem;
    line-height: 1;
}

/* plan-header-modern moved to trainer.css - removed duplicate */

.client-info-content {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 64px); /* Account for button width */
}

.client-name-wrap {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    max-width: 100%;
}

.client-username-left {
    text-align: left !important;
    margin: 0;
    padding: 0;
}

/* Responsive adjustments for client info */
@media (max-width: 480px) {
    .client-info-content {
        max-width: calc(100% - 48px); /* Smaller button on mobile */
    }
    
    .plan-header-modern {
        gap: 8px;
    }
}

/* Responsive adjustments for message buttons */
@media (max-width: 480px) {
    .message-button-circle {
        width: 30px;
        height: 30px;
    }
    
    .message-button-circle i {
        font-size: 1.0rem;
    }
    
    .message-button-small {
        width: 28px;
        height: 28px;
    }
    
    .message-button-small i {
        font-size: 1.0rem;
    }
}

/* plan-actions-modern moved to trainer.css - removed duplicate */

/* Dark theme support for message buttons */
html.dark-theme .message-button-circle,
html.dark-theme .message-button-small {
    background: var(--tg-theme-button-color, #40a7e3);
    box-shadow: 0 2px 8px rgba(64, 167, 227, 0.4);
}

html.dark-theme .message-button-circle:hover,
html.dark-theme .message-button-small:hover {
    background: #5bb3ec;
    box-shadow: 0 4px 12px rgba(64, 167, 227, 0.5);
}

/* Нормы питания */
.nutrition-norms {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.norms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.norm-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.norm-label {
    font-size: 1.0rem;
    color: #666;
    margin-bottom: 4px;
}

.norm-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: var(--tg-theme-bg-color, #fff);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    margin: 40px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    max-height: calc(100vh - 80px);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: var(--tg-theme-bg-color, #fff);
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--tg-theme-text-color, #333);
}

.modal-body {
    padding: 20px 24px 24px 24px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px 20px 24px;
    border-top: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    background: var(--tg-theme-bg-color, #fff);
    border-radius: 0 0 12px 12px;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--tg-theme-hint-color, #666);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    color: var(--tg-theme-text-color, #333);
    background: var(--tg-theme-secondary-bg-color, rgba(0,0,0,0.05));
}

/* Plans grid in modal */
.modal .plans-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: none;
    overflow: visible;
    padding: 4px 20px;
}

/* Responsive modal */
@media (max-width: 600px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: calc(100vh - 40px);
    }
    
    .modal-header {
        padding: 16px 20px 12px 20px;
    }
    
    .modal-body {
        padding: 16px 20px 20px 20px;
    }
    
    .modal .plans-grid {
        padding: 4px 16px;
    }
    
    .modal-footer {
        padding: 12px 20px 16px 20px;
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .modal-footer .primary-button,
    .modal-footer .secondary-button {
        width: 100%;
        justify-content: center;
    }
}

/* Form improvements in modals */
.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group:last-child {
    margin-bottom: 0;
}

.modal .form-control {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid var(--tg-theme-section-separator-color, #ddd);
    border-radius: 8px;
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal .form-control:focus {
    border-color: var(--tg-theme-button-color, #40a7e3);
    outline: none;
    box-shadow: 0 0 0 3px rgba(64, 167, 227, 0.1);
}

/* Tab styles - improved with rounded corners and proper styling */
.tab-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
    padding: 0;
    border: none;
}

.tab-button {
    background: var(--tg-theme-bg-color, #ffffff);
    border: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
    border-radius: 16px;
    color: var(--tg-theme-text-color, #000000);
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.0rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-button:hover {
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--tg-theme-button-color, #40a7e3), var(--tg-theme-link-color, #2481cc));
    color: var(--tg-theme-button-text-color, #ffffff);
    border-color: var(--tg-theme-button-color, #40a7e3);
    box-shadow: 0 2px 8px rgba(64, 167, 227, 0.2);
}

/* Responsive tab buttons */
@media (max-width: 600px) {
    .tab-buttons {
        gap: 6px;
        margin-bottom: 20px;
    }
    
    .tab-button {
        font-size: 1.0rem;
        padding: 10px 6px;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .tab-buttons {
        gap: 4px;
        margin-bottom: 16px;
    }
    
    .tab-button {
        font-size: 1.0rem;
        padding: 8px 4px;
        min-height: 36px;
    }
}

.nutrition-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0;
}
.nutrition-header h3 {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 120px;
}
.nutrition-header-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
}
.nutrition-header-actions button {
    min-width: 120px;
    min-height: 44px;
    width: auto;
    box-sizing: border-box;
}
@media (max-width: 500px) {
    .nutrition-header {
        flex-direction: column;
        align-items: stretch;
    }
    .nutrition-header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
    }
    .nutrition-header-actions button {
        width: 150px;
        min-width: 0;
    }
}

.measurements-history-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.measure-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    font-size: 1rem;
}
.measure-date {
    font-weight: 600;
    margin-bottom: 4px;
    color: #222;
}
#measurementsRangeSwitcher .btn {
    min-width: 70px;
    font-size: 1rem;
    padding: 7px 10px;
}
@media (max-width: 600px) {
    .measure-card { font-size: 1.02rem; padding: 8px 7px; }
    #measurementsRangeSwitcher .btn { font-size: 1.02rem; min-width: 60px; padding: 7px 4px; }
    .card { padding: 7px; }
}

/* График: легенда компактная */
.chartjs-legend ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chartjs-legend li { font-size: 0.98em; margin: 0 6px 0 0; padding: 0; list-style: none; }

/* Кнопки периода */
.range-switcher .btn {
    background: var(--tg-theme-bg-color, #ffffff);
    border: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
    border-radius: 12px;
    color: var(--tg-theme-text-color, #000000);
    padding: 8px 16px;
    font-size: 1.0rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 60px;
}

.range-switcher .btn.active, 
.range-switcher .btn:active {
    background: var(--tg-theme-button-color, #40a7e3);
    color: var(--tg-theme-button-text-color, #ffffff);
}

.range-switcher .btn:hover {
    background: var(--tg-theme-secondary-bg-color, #f8f9fa);
    transform: translateY(-1px);
}

/* Карточки истории замеров */
.measurements-history-cards {
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.measure-card {
    background: var(--tg-theme-bg-color, #fff);
    border-radius: 16px;
    padding: 13px 16px 10px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    font-size: 1.04rem;
    transition: box-shadow 0.18s;
    border: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
}
.measure-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.13);
}
.measure-date {
    font-weight: 700;
    font-size: 1.13em;
    margin-bottom: 7px;
    color: var(--tg-theme-link-color, #2176b6);
}
.measure-params {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}
.measure-param {
    min-width: 110px;
    font-size: 1em;
    color: var(--tg-theme-text-color, #000);
}
.measure-param.weight { color: var(--tg-theme-button-color, #40a7e3); font-weight: 600; }
@media (max-width: 600px) {
    .measure-card { font-size: 1.03rem; padding: 8px 7px; }
    .measure-date { font-size: 1.07em; }
    .measure-params { flex-direction: column; gap: 3px; }
    .measure-param { min-width: 0; }
    .card { padding: 7px; }
}

/* График: скругление и тень */
#measurementsChartCanvas {
    background: var(--tg-theme-bg-color, #fff);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 0;
}

/* Mobile Navigation */
.nav-bar-mobile {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: var(--tg-theme-bg-color, #fff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  padding: 0 12px;
}

.nav-bar-mobile .nav-btn {
    background: var(--tg-theme-bg-color, #ffffff);
    border: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
    border-radius: 16px;
    color: var(--tg-theme-text-color, #000000);
    padding: 12px 16px;
    font-size: 1.0rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-bar-mobile .nav-btn:active {
  background: #e6f0fa;
}

@media (min-width: 700px) {
  .nav-bar-mobile { display: none; }
}

.btn-nutrition-norms {
    background: linear-gradient(135deg, var(--tg-theme-button-color, #40a7e3), var(--tg-theme-link-color, #2481cc));
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 16px;
    padding: 14px 24px;
    font-size: 1.0rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.form-select {
  display: inline-block;
  width: auto;
  min-width: 120px;
  max-width: 220px;
  padding: 8px 36px 8px 12px;
  font-size: 1rem;
  color: var(--tg-theme-text-color, #222);
  background: var(--tg-theme-bg-color, #fff) url('data:image/svg+xml;utf8,<svg fill="%236c757d" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>') no-repeat right 12px center/18px 18px;
  border: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(60,60,60,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  cursor: pointer;
}
.form-select:focus {
  border-color: var(--tg-theme-button-color, #40a7e3);
  outline: none;
  box-shadow: 0 0 0 2px rgba(64,167,227,0.15);
}
.form-select:hover {
  border-color: var(--tg-theme-button-color, #40a7e3);
}
.form-select option {
  color: var(--tg-theme-text-color, #222);
  background: var(--tg-theme-bg-color, #fff);
}

/* SEARCH CONTAINER STYLES */
.search-container {
    position: relative;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tg-theme-hint-color, #707579);
    font-size: 1rem;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
    border-radius: 8px;
    background: var(--app-bg-color);
    color: var(--app-text-color);
    font-size: 1.0rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--app-button-color);
    box-shadow: 0 0 0 3px rgba(64, 167, 227, 0.1);
}

.search-input::placeholder {
    color: var(--tg-theme-hint-color, #707579);
}

/* ADD CLIENT BUTTON STYLES */
.add-client-container {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 100;
}

.add-client-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--tg-theme-button-color, #40a7e3);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(64, 167, 227, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-client-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(64, 167, 227, 0.4);
}

.add-client-button:active {
    transform: translateY(0);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.plan-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.plan-meta {
    font-size: 1.0rem;
    color: #777;
    margin-bottom: 12px;
}

.plan-actions {
    display: flex;
    gap: 8px;
}

/* plan-action-btn moved to trainer.css - removed duplicate */

/* UNIFIED TEXT STYLES - Extending from trainer.css */
.plan-description-modern,
.form-input-modern,
.form-textarea-modern,
.form-label-modern,
.client-meta,
.plan-meta,
.norm-label,
.guide-text-modern,
.guide-list-modern li,
.exercise-name,
.file-upload-text,
.file-name,
.search-input,
.form-control {
    font-size: 1rem;
}

/* Font size improvements - ensuring minimum 1rem */
.client-meta,
.plan-meta,
.norm-label,
.search-input,
.form-control,
.card .card-text,
.list-group-item,
.table td,
.table th,
.form-label,
.form-text {
    font-size: 1.0rem;
}

/* Button group improvements */
.card .btn-group .btn {
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.0rem;
}

/* Measurements range switcher specific */
#measurementsRangeSwitcher .btn { 
    font-size: 1.0rem; 
    min-width: 60px; 
    padding: 7px 4px; 
    border-radius: 12px;
    font-weight: 600;
} 

/* Tab content styles */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Additional spacing improvements for specific elements */
#clientInfo {
    margin-top: 24px !important;
    margin-bottom: 20px;
}

/* Ensure proper spacing in client_info layout */
@media (max-width: 600px) {
    #clientInfo {
        margin-top: 20px !important;
    }
}

@media (max-width: 480px) {
    #clientInfo {
        margin-top: 16px !important;
    }
} 

/* SEARCHABLE SELECT STYLES */
.searchable-select-container {
    position: relative;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--tg-theme-hint-color, #707579);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 10;
}

.search-clear-btn:hover {
    color: var(--app-text-color, #333);
}

.search-clear-btn.show {
    display: flex;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--app-bg-color, #fff);
    border: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    color: var(--app-text-color, #333);
    border-bottom: 1px solid var(--tg-theme-section-separator-color, #e1e5e9);
    transition: background-color 0.2s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--tg-theme-secondary-bg-color, #f3f4f6);
}

.dropdown-item:active {
    background-color: var(--tg-theme-button-color, #40a7e3);
    color: white;
}

/* Стили для темной темы */
html.dark-theme .dropdown-list {
    background: var(--tg-theme-bg-color, #1a1a1a);
    border-color: var(--tg-theme-section-separator-color, #2a2a2a);
}

html.dark-theme .dropdown-item {
    color: var(--tg-theme-text-color, #fff);
    border-bottom-color: var(--tg-theme-section-separator-color, #2a2a2a);
}

html.dark-theme .dropdown-item:hover {
    background-color: var(--tg-theme-secondary-bg-color, #2a2a2a);
}

/* Hide number input spinners/arrows */
input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

/* Dark theme specific styles */
html.dark-theme .range-switcher .btn:hover {
    background: var(--tg-theme-secondary-bg-color, #2a2a2a);
}

html.dark-theme .measure-card {
    box-shadow: 0 2px 12px rgba(255,255,255,0.05);
}

html.dark-theme .measure-card:hover {
    box-shadow: 0 4px 20px rgba(255,255,255,0.08);
}

html.dark-theme #measurementsChartCanvas {
    box-shadow: 0 2px 12px rgba(255,255,255,0.05);
}

html.dark-theme .nav-bar-mobile {
    box-shadow: 0 2px 8px rgba(255,255,255,0.05);
}

html.dark-theme .nav-bar-mobile .nav-btn:active {
    background: var(--tg-theme-secondary-bg-color, #2a2a2a);
}

html.dark-theme .form-select {
    background: var(--tg-theme-bg-color, #1a1a1a) url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>') no-repeat right 12px center/18px 18px;
    box-shadow: 0 1px 4px rgba(255,255,255,0.04);
}

html.dark-theme .modal-content {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

html.dark-theme .close-button:hover {
    background: var(--tg-theme-secondary-bg-color, rgba(255,255,255,0.1));
}