/* web_app/css/pages/top-up.css */

#top-up-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 26, 31, 0.95); /* Semi-transparent background */
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align to the top */
    z-index: 1001; /* Above other content but below potential pop-ups from wallet */
    padding-top: 20px;
    box-sizing: border-box;
    color: #fff;
}

.top-up-modal-content {
    width: 100%;
    max-width: 480px; /* Max-width for larger screens */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
}

.top-up-modal-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 0 5px; /* Small padding to align with content */
    box-sizing: border-box;
}

.top-up-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    flex-grow: 1;
    text-align: center;
}

#top-up-modal-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.top-up-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#ton-connect-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 20px 0;
    border: 1px dashed red; /* Для отладки, чтобы видеть контейнер */
}

/*
 Библиотека TonConnectUI вставляет свою кнопку с классом .tc-button.
 Нам нужно явно задать ей стили, чтобы она была видна и соответствовала теме.
*/
#ton-connect-container .tc-button {
    background-color: #007AFF; /* Яркий синий цвет, как у кнопок в Telegram */
    color: white;
    font-size: 18px;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#ton-connect-container .tc-button:hover {
    background-color: #0056b3;
}

.payment-details {
    display: none; /* Initially hidden, shown after wallet connection */
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}

.payment-details p {
    margin: 0;
    font-size: 16px;
}

.payment-details input[type="number"] {
    width: 80%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background-color: #2a2d34;
    color: #fff;
    font-size: 18px;
    text-align: center;
}

/* Hide the default number input spinner */
.payment-details input[type=number]::-webkit-inner-spin-button, 
.payment-details input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
.payment-details input[type=number] {
  -moz-appearance: textfield;
}

#send-tx-btn {
    /* Using existing button styles */
}
