/* ========================================
   Optimized CSS for swap-create
   Generated automatically - DO NOT EDIT MANUALLY
   ======================================== */

/* Статистика оптимизации:
   Статических селекторов: 57
   Динамических селекторов: 0
   Инлайн свойств: 15
   Всего CSS правил: 786
   Используемых правил: 149
   Экономия: 81%
*/

body.has-tab-bar .container {
    padding-bottom: 100px;
    min-height: calc(100vh - 60px);
}

html {
    scroll-behavior: smooth;
}

body.dark-theme .request-section strong {
    color: #999;
}

body.dark-theme .instruction-card ol {
    color: var(--tg-theme-text-color);
}

body.dark-theme .instruction-card h3 {
    color: #6ee7b7;
}

body.dark-theme .template-preview-description p {
    color: var(--tg-theme-text-color);
}

body.dark-theme .warning-text strong {
    color: #fcd34d;
}

body.dark-theme .warning-text {
    color: #fde68a;
}

body.dark-theme .warning-title {
    color: #fbbf24;
}

body.dark-theme .warning-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-color: rgba(245, 158, 11, 0.5);
}

body.dark-theme .template-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
}

.back-button {
    min-width: 44px;
    min-height: 44px;
}

.banner-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
}

.banner-content p {
    margin: 0 0 6px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #78350f;
}

.banner-steps li {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #78350f;
}

.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.btn .badge-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    background: #FFD700;
    color: #000;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-cancel {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.btn-primary {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.btn-primary > * {
    position: relative;
    z-index: 2;
}

.btn-secondary {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.calendar {
    width: 100%;
}

.card {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
}

.chain-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    cursor: pointer;
    padding: 12px;
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 8px;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.circular-empty h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color);
}

.circular-empty p {
    color: var(--tg-theme-hint-color);
    line-height: 1.6;
}

.circular-info p {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 20px;
}

.close-modal {
    min-width: 44px;
    min-height: 44px;
}

.contact-info-header strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
}

.container {
    max-width: 100%;
    padding: var(--spacing-lg);
    padding-bottom: var(--spacing-4xl);
}

.dark-theme .banner-content h3 {
    color: #fbbf24;
}

.dark-theme .banner-content p {
    color: #fde68a;
}

.dark-theme .banner-steps li {
    color: #fde68a;
}

.dark-theme .circular-info p {
    color: var(--tg-theme-text-color);
}

.dark-theme .info-header h3 {
    color: var(--tg-theme-text-color);
}

.dark-theme .request-section strong {
    color: #999;
}

.dark-theme .search-hint strong {
    color: var(--tg-theme-text-color);
}

.date-checkbox span {
    flex: 1;
    font-size: 15px;
    color: var(--tg-theme-text-color);
}

.date-item span {
    font-size: 15px;
    font-weight: 500;
}

.dates-container {
    min-height: 60px;
    padding: 12px;
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-section h4 {
    font-size: 15px;
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-state .hint {
    color: var(--tg-theme-hint-color);
    font-size: 14px;
    margin-bottom: 20px;
}

.empty-state p {
    margin-bottom: 12px;
}

.error-state p {
    margin-bottom: 12px;
}

.example-bad p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.example-bad strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.example-good p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.example-good strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.faq-item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.faq-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    color: var(--text-primary);
}

.filter-results strong {
    color: var(--tg-theme-button-color);
    font-weight: 600;
}

.forge-steps li {
    margin-bottom: 6px;
}

.form-card h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.form-group:focus-within label {
    color: #3b82f6;
}

.form-section {
    margin-bottom: 24px;
}

.form-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.info-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.info-card li {
    margin-bottom: 8px;
    font-size: 14px;
}

.info-card ol {
    margin-left: 20px;
    color: var(--tg-theme-hint-color);
}

.info-card p {
    margin: 0;
}

.info-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

.info-hint {
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: start;
    animation: fadeInDown 0.4s ease;
}

.info-hint p {
    margin: 0;
    line-height: 1.5;
}

.info-hint strong {
    display: block;
    margin-bottom: 6px;
}

.info-message p {
    margin-bottom: 8px;
}

.info-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--tg-theme-text-color);
    text-align: center !important;
    display: block;
    width: 100%;
}

.info-section li {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 6px;
    color: var(--tg-theme-text-color);
}

.info-section p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 8px 0;
    color: var(--tg-theme-text-color);
}

.info-section ul {
    margin: 8px 0;
    padding-left: 20px;
}

.instruction-card h3 {
    color: #065f46;
    margin-bottom: 12px;
    font-size: 18px;
}

.instruction-card ol {
    color: #064e3b;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 100px;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-normal) ease-in-out, visibility var(--transition-normal) ease-in-out;
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-body h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--tg-theme-text-color);
}

.modal-content {
    width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-footer button {
    width: 100%;
        min-width: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-md) var(--spacing-xl);
    border-bottom: 1px solid var(--tg-theme-secondary-bg-color);
}

.modal-header h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    margin: 0;
}

.nav-button .icon {
    font-size: 24px;
}

.nav-button .text {
    font-size: 17px;
    font-weight: 510;
    letter-spacing: -0.022em;
    line-height: 1.35;
    text-decoration: none !important;
}

.participant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ptr-icon svg {
    fill: var(--tg-theme-button-color);
    transition: transform 0.3s ease;
}

.request-actions .btn {
    width: 100%;
}

.request-author-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.request-detail-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.request-section p {
    font-size: 14px;
}

.request-section strong {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    opacity: 1;
    color: #666;
}

.response-actions .btn {
    width: 100%;
}

.response-card .request-section p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--tg-theme-text-color);
    margin: 0;
}

.response-card .request-section strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
    margin-bottom: 6px;
    opacity: 0.9;
}

.response-dates > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.response-dates p {
    margin: 0;
    font-size: 15px;
    color: var(--tg-theme-text-color);
    font-weight: 500;
    line-height: 1.5;
}

.response-dates strong {
    font-size: 13px;
    color: var(--tg-theme-hint-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.response-details p {
    margin: 6px 0;
    font-size: 14px;
}

.response-header p {
    margin: 0;
    font-size: 13px;
    color: var(--tg-theme-hint-color);
}

.response-header strong {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.response-message p {
    margin: 0;
    font-size: 14px;
    font-style: italic;
}

.response-message strong {
    display: block;
    margin-bottom: 4px;
}

.response-section p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--tg-theme-text-color);
}

.response-section strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.rule-content h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color);
}

.rule-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--tg-theme-text-color);
    margin-bottom: 12px;
}

.rule-content ul {
    margin-left: 20px;
    font-size: 14px;
}

.rule-content ul li {
    margin-bottom: 8px;
}

.rules-content h2 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.rules-content p {
    margin: 0 0 12px 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

.rules-explanation p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.rules-explanation strong {
    display: block;
    margin-bottom: 6px;
    color: #3b82f6;
    font-size: 14px;
}

.rules-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--tg-theme-text-color);
}

.schedule-card p {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    margin: 0;
}

.search-hint strong {
    color: #1f2937;
    font-weight: 700;
}

.section-hint {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 16px;
    line-height: 1.4;
}

.step-content p {
    font-size: 12px;
}

.step-content strong {
    font-size: 13px;
}

.template-card {
    padding: 12px;
}

.template-description {
    font-size: 11px;
}

.template-icon {
    font-size: 28px;
}

.template-name {
    font-size: 14px;
}

.template-preview-description p {
    color: #1e3a8a;
    line-height: 1.8;
    margin: 0;
}

.template-preview-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--tg-theme-text-color);
}

.templates-grid {
    grid-template-columns: repeat(2, 1fr);
}

.templates-section {
    margin-bottom: 32px;
}

.templates-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color);
}

.time-picker {
    padding: 8px 0;
}

.time-range input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
}

.time-range span {
    font-size: 20px;
    color: var(--tg-theme-hint-color);
}

.timezone-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--tg-theme-bg-color);
    border-radius: 8px;
    margin-bottom: 8px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--tg-theme-button-color, #3b82f6);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.warning-card {
    flex-direction: column;
        gap: 8px;
}

.warning-content {
    flex: 1;
}

.warning-icon {
    font-size: 24px;
}

.warning-text {
    font-size: 13px;
}

.warning-text strong {
    font-weight: var(--font-weight-bold);
    color: #92400e;
}

.warning-title {
    font-size: 15px;
}

:root {
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #000000;
    --tg-theme-hint-color: #999999;
    --tg-theme-link-color: #2481cc;
    --tg-theme-button-color: #2481cc;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f4f4f5;
    
    
    --tg-theme-button-color-rgb: 62, 144, 234;
    --tg-theme-hint-color-rgb: 153, 153, 153;
    
    
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 50%;
    
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    --spacing-3xl: 28px;
    --spacing-4xl: 32px;
    
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.25);
    
    
    --transition-fast: 0.1s;
    --transition-normal: 0.2s;
    --transition-slow: 0.3s;
    --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
    
    
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 15px;
    --font-size-md: 16px;
    --font-size-lg: 17px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 34px;
    
    --font-weight-normal: 400;
    --font-weight-medium: 590;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    
    --line-height-tight: 1.15;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;
    
    
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-modal: 1100;
    --z-tooltip: 1500;
}

a {
    text-decoration: none !important;
}

a * {
    text-decoration: none !important;
}

header {
    margin-bottom: var(--spacing-3xl);
}

header h1 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
    line-height: var(--line-height-tight);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

to {
    opacity: 1;
        transform: translateY(0);
}

/* Radio labels for give type selector */
.radio-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--tg-theme-hint-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    background: var(--tg-theme-secondary-bg-color);
}

.radio-label:hover {
    border-color: var(--tg-theme-button-color);
    background: var(--tg-theme-bg-color);
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--tg-theme-button-color);
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: var(--tg-theme-button-color);
    background: var(--tg-theme-bg-color);
    box-shadow: 0 0 0 1px var(--tg-theme-button-color);
}

.radio-label:has(input[type="radio"]:disabled) {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--tg-theme-secondary-bg-color);
    border-color: var(--tg-theme-hint-color);
}

.radio-label:has(input[type="radio"]:disabled):hover {
    border-color: var(--tg-theme-hint-color);
    background: var(--tg-theme-secondary-bg-color);
}

.radio-label input[type="radio"]:disabled {
    cursor: not-allowed;
}

.give-type-selector,
.take-type-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ================================================
   АДАПТИВНЫЕ ИНФОРМАЦИОННЫЕ БЛОКИ
   ================================================ */

.info-box {
    padding: 14px;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
    border-left: 4px solid;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.info-box-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.info-box-content {
    flex: 1;
    min-width: 0;
}

.info-box-title {
    font-size: 15px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: var(--tg-theme-text-color);
}

.info-box-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tg-theme-text-color);
    opacity: 0.85;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Вариант: Информация (синий) */
.info-box-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(147, 51, 234, 0.12) 100%);
    border-left-color: var(--tg-theme-link-color, #3b82f6);
}

body.dark-theme .info-box-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
}

/* Вариант: Предупреждение (желтый) */
.info-box-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.12) 100%);
    border-left-color: #f59e0b;
}

body.dark-theme .info-box-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.18) 100%);
}

.info-box-warning .info-box-title {
    color: #f59e0b;
}

body.dark-theme .info-box-warning .info-box-title {
    color: #fbbf24;
}

/* Вариант: Успех (зеленый) */
.info-box-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.12) 100%);
    border-left-color: #10b981;
}

body.dark-theme .info-box-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
}

/* Вариант: Ошибка/Опасность (красный) */
.info-box-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.15) 100%);
    border-left-color: #ef4444;
}

body.dark-theme .info-box-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(220, 38, 38, 0.2) 100%);
}

.info-box-danger .info-box-title {
    color: #dc2626;
}

body.dark-theme .info-box-danger .info-box-title {
    color: #f87171;
}

/* Тип обмена карточки */
.exchange-type-card {
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.exchange-type-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.exchange-type-card-emoji {
    font-size: 24px;
    flex-shrink: 0;
}

.exchange-type-card-title {
    color: var(--tg-theme-text-color);
    font-size: 15px;
    font-weight: 600;
}

.exchange-type-card-text {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--tg-theme-text-color);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.exchange-type-card-example {
    margin: 0;
    font-size: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

body.dark-theme .exchange-type-card-example {
    background: rgba(255, 255, 255, 0.08);
}

/* Зеленый тип (успех) */
.exchange-type-card-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.10) 100%);
    border-left-color: #10b981;
}

body.dark-theme .exchange-type-card-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.12) 100%);
}

/* Синий тип (инфо) */
.exchange-type-card-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(147, 51, 234, 0.10) 100%);
    border-left-color: #3b82f6;
}

body.dark-theme .exchange-type-card-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.12) 100%);
}

/* ================================================
   ГЛОБАЛЬНЫЕ СТИЛИ ДЛЯ ПРАВИЛЬНОГО ПЕРЕНОСА
   ================================================ */

/* Применяем правильный перенос ко всем элементам */
.form-section,
.info-box,
.exchange-type-card,
.info-hint,
.section-hint,
.template-description,
.schedule-description,
p,
span,
div {
    overflow-wrap: break-word;
    word-wrap: break-word;
    /* НЕ используем word-break: break-word - это ломает слова */
}

/* Запрещаем перенос для эмодзи и иконок */
.info-box-icon,
.exchange-type-card-emoji,
.template-icon,
.schedule-emoji {
    word-break: keep-all;
    white-space: nowrap;
}

/* Улучшаем читаемость длинных слов */
strong {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Убеждаемся, что контейнеры имеют правильную ширину */
.info-box-content,
.exchange-type-card,
.info-box-text,
.exchange-type-card-text {
    max-width: 100%;
    overflow: hidden;
}

/* ================================================
   КОМПАКТНЫЙ ДИЗАЙН
   ================================================ */

/* Скрываем старые элементы */
.templates-section,
.form-progress-container {
    display: none !important;
}

/* Быстрые шаблоны - компактная версия */
.quick-templates {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-template-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(147, 51, 234, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-template-card:active {
    transform: scale(0.98);
}

body.dark-theme .quick-template-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(147, 51, 234, 0.12) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.quick-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}

.quick-content {
    flex: 1;
    min-width: 0;
}

.quick-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
    margin-bottom: 2px;
}

.quick-hint {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
    opacity: 0.8;
}

/* Компактная информация */
.compact-info {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    border-left: 3px solid #10b981;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tg-theme-text-color);
    margin-bottom: 16px;
}

body.dark-theme .compact-info {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.12) 100%);
}

/* Компактное предупреждение */
.compact-warning {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.10) 100%);
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tg-theme-text-color);
    margin-bottom: 16px;
}

body.dark-theme .compact-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
}

.compact-warning strong {
    color: #f59e0b;
}

body.dark-theme .compact-warning strong {
    color: #fbbf24;
}

/* Свернутые правила обмена */
.exchange-rules-collapsed {
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

body.dark-theme .exchange-rules-collapsed {
    border-color: rgba(59, 130, 246, 0.3);
}

.exchange-rules-collapsed summary {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(147, 51, 234, 0.06) 100%);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
    list-style: none;
    user-select: none;
}

body.dark-theme .exchange-rules-collapsed summary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.10) 0%, rgba(147, 51, 234, 0.10) 100%);
}

.exchange-rules-collapsed summary::-webkit-details-marker {
    display: none;
}

.exchange-rules-collapsed summary::after {
    content: '▼';
    float: right;
    font-size: 10px;
    transition: transform 0.2s;
}

.exchange-rules-collapsed[open] summary::after {
    transform: rotate(-180deg);
}

.exchange-rules-content {
    padding: 16px;
    font-size: 13px;
    background: var(--tg-theme-bg-color);
}

body.dark-theme .exchange-rules-content {
    background: rgba(0, 0, 0, 0.2);
}

.rule-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
}

body.dark-theme .rule-item {
    background: rgba(59, 130, 246, 0.08);
}

.rule-emoji {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1.4;
}

.rule-text {
    flex: 1;
    line-height: 1.4;
}

.rule-text strong {
    font-size: 13px;
    color: var(--tg-theme-text-color);
}

.rule-text small {
    font-size: 11px;
    color: var(--tg-theme-hint-color);
    opacity: 0.85;
}

.rule-critical {
    margin-top: 8px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.10) 100%);
    border-left: 3px solid #ef4444;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--tg-theme-text-color);
}

body.dark-theme .rule-critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.15) 100%);
}

.rule-critical strong {
    color: #dc2626;
}

body.dark-theme .rule-critical strong {
    color: #f87171;
}

/* ================================================
   КОМПАКТНЫЕ ТИПЫ ОБМЕНОВ (для страницы правил)
   ================================================ */

.compact-exchange-type {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(147, 51, 234, 0.06) 100%);
    border-left: 3px solid rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body.dark-theme .compact-exchange-type {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.10) 0%, rgba(147, 51, 234, 0.10) 100%);
    border-left-color: rgba(59, 130, 246, 0.5);
}

.type-emoji {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1.3;
}

.type-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.type-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--tg-theme-text-color);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.type-content p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--tg-theme-hint-color);
    opacity: 0.9;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Компактная секция правил (без flex-layout для всей секции) */
.rules-section-compact {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.dark-theme .rules-section-compact {
    background: var(--tg-theme-secondary-bg-color);
}

.rules-section-compact h2 {
    color: var(--tg-theme-text-color);
}

/* ================================================
   ЧАСОВЫЕ ПОЯСА
   ================================================ */

.timezone-container {
    background: rgba(52, 152, 219, 0.08);
    border-radius: 10px;
    padding: 10px;
    margin: 10px 0;
}

body.dark-theme .timezone-container {
    background: rgba(52, 152, 219, 0.12);
}

.timezone-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    gap: 12px;
    min-width: 0;
}

.timezone-item:last-child {
    margin-bottom: 0;
}

.timezone-highlight {
    background: rgba(59, 130, 246, 0.08);
}

body.dark-theme .timezone-highlight {
    background: rgba(59, 130, 246, 0.15);
}

.tz-city {
    flex: 1;
    font-size: 13px;
    color: var(--tg-theme-text-color);
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.tz-code {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--tg-theme-hint-color);
    opacity: 0.8;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tz-main {
    color: var(--tg-theme-link-color);
    font-weight: 600;
    opacity: 1;
}


