/* bot_app/web_app/css/components/buttons.css */

.balance-add-btn {
    width: 24px; height: 24px; flex-shrink: 0; background-color: #28a745;
    color: #121212; border: none; border-radius: 50%; cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.balance-add-btn:active { transform: scale(0.95); }

#open-case-from-detail-btn {
    width: 100%; max-width: 300px; background-image: linear-gradient(to right, #28a745, #218838);
    color: white; padding: 15px; border-radius: 12px; font-size: 18px;
    font-weight: bold; cursor: pointer; border: none; transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
#open-case-from-detail-btn svg {
    margin-right: 2px; /* Reduce gap, move closer to text */
    margin-left: -3px; /* Further pull it left if needed */
    width: 18px; /* Ensure consistent size */
    height: 18px; /* Ensure consistent size */
}
#open-case-from-detail-btn:hover { box-shadow: 0 0 25px rgba(40, 167, 69, 0.8); transform: scale(1.03); }
#open-case-from-detail-btn:active { transform: scale(0.98); box-shadow: 0 0 10px rgba(40, 167, 69, 0.4); }

/* Общий стиль для кнопок в футере модального окна результатов */
#result-modal-footer > button {
    flex: 1; /* Заставляет кнопки занимать одинаковое пространство */
    padding: 12px 10px; /* Скорректируем padding */
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex; /* Включаем flex для центрирования контента */
    align-items: center;
    justify-content: center;
    gap: 6px; /* Отступ между текстом и иконкой */
}

/* Стили для кнопки "Продать все" */
.sell-all-btn {
    background-image: linear-gradient(to right, var(--success-color), #218838); /* Зеленый градиент */
    color: white;
    border: 2px solid transparent; /* Добавляем рамку для консистентности */
}

.sell-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.sell-all-btn:disabled {
    background-image: none;
    background-color: #555;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#sell-all-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#sell-all-price .star-icon {
    width: 16px; /* Увеличим для лучшей видимости */
    height: 16px;
}

/* Стили для кнопки "Отлично!" (наследуются от общего + свои) */
#result-modal-close-btn {
    background-image: none;
    background-color: var(--secondary-color); /* Серый цвет */
    color: var(--text-color); /* Цвет текста по умолчанию */
    box-shadow: none;
    border: 2px solid transparent;
}

#result-modal-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); /* Темная тень */
}

.sell-btn {
    background-color: transparent;
    color: #8e8e93;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid #8e8e93;
    transition: all 0.3s ease;
    box-shadow: none;
    display: inline-flex;
    align-items: center; /* Главное правило для выравнивания */
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    width: auto;
    white-space: nowrap;
}

.sell-btn .star-icon {
    width: 16px;
    height: 16px;
    position: relative;
    left: -3px;
    top: -1px; /* Двигаем вверх */
}

.sell-btn:hover {
    background-image: linear-gradient(to right, #28a745, #218838);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    border-color: transparent;
}
.sell-btn:active { transform: scale(0.98); box-shadow: 0 1px 5px rgba(40, 167, 69, 0.2); }
.sell-btn:disabled { background-image: none; background-color: #555; cursor: not-allowed; box-shadow: none; color: #ccc; border-color: #555; }

/* Кнопки в модальных окнах */
#modal-buttons { display: flex; gap: 10px; margin-top: 20px; }
#modal-confirm-btn, #modal-close-btn, #result-modal-close-btn { padding: 12px 20px; border-radius: 12px; border: none; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s ease-in-out; flex-grow: 1; border: 2px solid transparent; }
#modal-confirm-btn, #result-modal-close-btn { background-image: linear-gradient(to right, #28a745, #218838); color: white; box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2); }
#modal-confirm-btn:hover, #result-modal-close-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3); }
#modal-close-btn { background-color: transparent; color: #aaa; border: 2px solid #555; }
#modal-close-btn:hover { background-color: #555; color: white; }
#modal-confirm-btn:active, #modal-close-btn:active, #result-modal-close-btn:active { transform: scale(0.97); }

.button-secondary-bordered {
    background-color: transparent;
    color: #aaa;
    border: 2px solid #555;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    width: 100%;
    margin-top: 20px;
}

.button-secondary-bordered:hover {
    background-color: #555;
    color: white;
}

/* Стили для модального окна подтверждения продажи */
#sell-confirm-modal .modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

#sell-confirm-message {
    display: flex;
    flex-direction: column; /* Allow text to stack */
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 21px; /* Добавляем высоту, чтобы модальное окно не "прыгало" */
    margin-bottom: 15px; /* Moved slightly higher */
    font-size: 20px; /* Increased font size */
}

#sell-confirm-message .star-icon {
     width: 14px; /* Чуть больше для читаемости в тексте */
     height: 14px;
}

/* Модальное окно активации промокода */
#promo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

#promo-modal .modal-content {
    background-color: var(--primary-color);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    width: 85%;
    max-width: 320px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    border: 1px solid var(--secondary-color);
    position: relative;
}

#promo-modal h2 {
    margin-top: 0;
}

#promo-input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
}

#promo-modal-buttons {
    display: flex;
    gap: 10px;
}

#promo-activate-btn, #promo-modal-close-btn {
    flex-grow: 1;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

#promo-activate-btn {
    background-image: linear-gradient(to right, #28a745, #218838);
    color: white;
}

#promo-modal-close-btn {
    background-color: transparent;
    color: #aaa;
    border: 2px solid #555;
}

#sell-confirm-btn, #sell-cancel-btn {
    padding: 8px; /* Еще уменьшил padding */
    border-radius: 8px; /* Уменьшил радиус */
    font-size: 16px; /* Increased font size */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex-grow: 1;
    border: 1px solid transparent;
    box-sizing: border-box;
}

#sell-confirm-btn {
    background-image: linear-gradient(to right, var(--success-color), #218838); /* Green gradient */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Adjusted gap */
    border: none;
    font-size: 16px; /* Increased font size for price */
}

#sell-confirm-btn svg {
    width: 16px; /* Reverted icon size */
    height: 16px;
    flex-shrink: 0;
    position: relative;
    left: -3px; /* Adjusted for new size */
    top: 0px;
}

#sell-cancel-btn {
    background-color: #555;
    color: white;
    border-color: #555; /* Делаем рамку того же цвета, что и фон */
}

.sell-btn.sold {
    background-image: none;
    background-color: var(--success-color);
    color: white;
    cursor: not-allowed;
    border-color: var(--success-color);
}

.sell-btn.sold:hover {
    transform: none;
    box-shadow: none;
}

.button-primary-redesigned {
    width: 320px; /* Wider fixed width */
    height: 60px; /* Fixed height */
    padding: 0; /* Remove padding as height is fixed */
    font-size: 16px;
    font-weight: bold;
    background-image: linear-gradient(to right, #28a745, #218838);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
    display: flex; /* Use flex to center content */
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent stretching */
}

.button-primary-redesigned:hover {
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.8);
    transform: scale(1.03);
}

.button-secondary-redesigned {
    width: 45px; /* Fixed width for copy button */
    height: 45px; /* Fixed height for copy button */
    padding: 0; /* Remove padding as height is fixed */
    flex-shrink: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.button-secondary-redesigned:hover {
    background-color: #3a3a3a;
}

#create-promo-btn-redesigned {
    width: 320px; /* Fixed width, same as invite button */
    height: 60px; /* Fixed height */
    padding: 0; /* Remove padding as height is fixed */
    font-size: 16px;
    font-weight: bold;
    background-image: linear-gradient(to right, #28a745, #218838); /* Changed to green gradient */
    color: white;
    border: none;
    border-radius: 12px; /* Changed to 12px */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5); /* Changed shadow to green */
    display: flex; /* Use flex to center content */
    align-items: center;
    justify-content: center;
}

/* General button styles */
.button-primary, .button-green {
    background-image: linear-gradient(to right, var(--success-color), #218838);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%; /* Make them take full width by default */
}

.button-primary:hover, .button-green:hover {
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.8);
    transform: scale(1.03);
}

.button-primary:active, .button-green:active {
    transform: scale(0.98);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.4);
}

.button-primary:disabled, .button-green:disabled {
    background-image: none;
    background-color: #555;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    color: #ccc;
}

.button-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 8px 25px; /* Уменьшаем вертикальный padding для уменьшения высоты */
    border-radius: 12px;
    font-size: 16px; /* Немного уменьшим размер шрифта */
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%; /* Сохраняем ширину */
}

.button-secondary:hover {
    background-color: #3a3a3a;
    transform: scale(1.02);
}

.button-secondary:active {
    transform: scale(0.98);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.button-secondary:disabled {
    background-color: #555;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    color: #ccc;
}

.button-danger {
    background-image: linear-gradient(to right, var(--danger-color), #c82333);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

.button-danger:hover {
    box-shadow: 0 0 25px rgba(220, 53, 69, 0.8);
    transform: scale(1.03);
}

.button-danger:active {
    transform: scale(0.98);
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.4);
}

.button-danger:disabled {
    background-image: none;
    background-color: #555;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    color: #ccc;
}

