/* ZoneTokens Manager - Simple Styles */

/* Simple tokens block on my-account page */
.zone-tokens-simple-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.zone-tokens-simple-block h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.5em;
}

.zone-tokens-simple-block p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 1.1em;
}

.zone-tokens-simple-block small {
    color: #999;
    font-size: 0.9em;
}

.simple-block-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.zone-tokens-simple-block .button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.zone-tokens-simple-block .button:hover {
    background: #005a87;
}

/* Main tokens container (for shortcode) */
.zone-tokens-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
}

.zone-tokens-header h3 {
    color: #333;
    margin-bottom: 20px;
}

.zone-tokens-balance {
    margin-bottom: 20px;
}

.tokens-count {
    font-size: 2.5em;
    font-weight: bold;
    color: #007cba;
}

.tokens-label {
    font-size: 1.2em;
    color: #666;
}



.zone-tokens-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.zone-tokens-buy-btn,
.zone-tokens-history-btn {
    background: #007cba;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
}

.zone-tokens-buy-btn:hover,
.zone-tokens-history-btn:hover {
    background: #005a87;
}

.zone-tokens-info {
    color: #666;
    line-height: 1.6;
}

/* Simple modal styles */
.zone-tokens-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.zone-tokens-modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.zone-tokens-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
}

.zone-tokens-close:hover {
    color: #333;
}

.zone-tokens-modal-content h3 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

/* Token slider section */
.token-slider-section {
    margin-bottom: 25px;
}

.token-input-section {
    margin: 20px 0;
    text-align: center;
}

.token-input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.token-input {
    width: 200px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1em;
    text-align: center;
    outline: none;
    transition: border-color 0.3s ease;
}

.token-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.token-input:invalid {
    border-color: #dc3545;
}

.token-slider-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.token-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    margin-bottom: 15px;
    cursor: pointer;
}

.token-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.token-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.token-slider::-webkit-slider-track {
    background: #007cba;
    height: 8px;
    border-radius: 4px;
}

.token-slider::-moz-range-track {
    background: #007cba;
    height: 8px;
    border-radius: 4px;
}

.token-amount-display {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.token-amount {
    font-size: 2em;
    font-weight: bold;
    color: #007cba;
}

/* Price calculation */
.price-calculation {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.price-calculation h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.total-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 10px;
}

.price-per-token {
    color: #666;
    font-size: 0.9em;
}

.savings-info {
    color: #28a745;
    font-weight: bold;
    margin-top: 10px;
}

/* Action buttons */
.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
}

.buy-tokens-btn {
    background: #28a745;
    color: white;
}

.buy-tokens-btn:hover {
    background: #218838;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Login required message */
.zone-tokens-login-required {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #666;
}

.zone-tokens-login-required a {
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
}

.zone-tokens-login-required a:hover {
    text-decoration: underline;
}

/* Transaction History Block */
.zone-tokens-history-block {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.zone-tokens-history-block h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.4em;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

/* No transactions message */
.no-transactions {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-transactions p {
    font-size: 1.1em;
    margin: 0;
}

.no-transactions a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.no-transactions a:hover {
    text-decoration: underline;
}

/* Transactions table */
.transactions-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.zone-tokens-transactions-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9em;
}

.zone-tokens-transactions-table thead {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
}

.zone-tokens-transactions-table th,
.zone-tokens-transactions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.zone-tokens-transactions-table th {
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zone-tokens-transactions-table tbody tr {
    transition: background-color 0.2s ease;
}

.zone-tokens-transactions-table tbody tr:hover {
    background-color: #f8f9fa;
}

.zone-tokens-transactions-table tbody tr:last-child td {
    border-bottom: none;
}

/* Transaction type styling */
.transaction-type {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.transaction-type.purchase {
    background: #d4edda;
    color: #155724;
}

.transaction-type.bonus {
    background: #fff3cd;
    color: #856404;
}

.transaction-type.refund {
    background: #cce5ff;
    color: #004085;
}

.transaction-type.spent {
    background: #f8d7da;
    color: #721c24;
}

.transaction-type.test_purchase {
    background: #e2e3e5;
    color: #383d41;
}

.transaction-type.manual {
    background: #d1ecf1;
    color: #0c5460;
}

/* Transaction tokens styling */
.transaction-tokens {
    font-weight: 600;
    font-size: 1.05em;
}

/* Positive token transactions (additions) */
.zone-tokens-transactions-table .transaction-tokens.positive,
.transaction-tokens.positive {
    color: #28a745 !important;
}

/* Negative token transactions (deductions) */
.zone-tokens-transactions-table .transaction-tokens.negative,
.transaction-tokens.negative,
.transaction-tokens[data-type="purchase_products"],
.transaction-tokens[data-type="spent"],
.transaction-tokens[data-type="deduct"] {
    color: #dc3545 !important;
}

/* Универсальное правило для всех элементов с минусом */
.transaction-tokens[data-sign="-"] {
    color: #dc3545 !important;
}

/* Transaction amount styling */
.transaction-amount {
    color: #007cba;
    font-weight: 600;
}

/* Transaction date styling */
.transaction-date {
    color: #6c757d;
    font-size: 0.9em;
}

/* Transaction description */
.transaction-description {
    color: #495057;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer with pagination info */
.transactions-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.transactions-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
}

.view-all-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: background 0.3s ease;
}

.view-all-btn:hover {
    background: #005a87;
}

/* Responsive design */
@media (max-width: 768px) {
    .zone-tokens-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .zone-tokens-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-actions button {
        width: 100%;
        max-width: 200px;
    }
    
    /* History table responsive */
    .zone-tokens-history-block {
        padding: 15px;
        margin: 20px 0;
    }
    
    .zone-tokens-transactions-table {
        font-size: 0.8em;
    }
    
    .zone-tokens-transactions-table th,
    .zone-tokens-transactions-table td {
        padding: 8px 6px;
    }
    
    .transaction-description {
        max-width: 120px;
    }
    
    .transactions-footer {
        flex-direction: column;
        text-align: center;
    }
    
    /* Hide some columns on mobile */
    .zone-tokens-transactions-table th:nth-child(5),
    .zone-tokens-transactions-table td:nth-child(5) {
        display: none;
    }
}
