/**
 * Public styles for The Tokenator plugin
 */

/* Token info */
.tt-token-info {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.tt-token-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.tt-token-stats {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tt-token-stat {
    flex: 1;
    min-width: 150px;
    margin-right: 20px;
    margin-bottom: 10px;
}

.tt-token-stat-label {
    font-weight: bold;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.tt-token-stat-value {
    color: #0073aa;
    font-size: 16px;
}

/* Token usage bar */
.tt-token-usage-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.tt-token-usage-progress {
    height: 100%;
    background-color: #0073aa;
    border-radius: 10px;
    position: relative;
}

.tt-token-usage-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* Token limit notice */
.tt-token-limit-notice {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
}

.tt-token-limit-notice p {
    margin: 0;
}

/* Lesson token usage */
.tt-lesson-token-usage {
    margin-top: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    font-size: 14px;
    color: #555;
}

/* Shortcode styles */
.tt-shortcode-token-limit,
.tt-shortcode-token-usage,
.tt-shortcode-token-usage-percentage,
.tt-shortcode-token-remaining,
.tt-shortcode-token-refresh-date,
.tt-shortcode-token-count,
.tt-shortcode-lesson-token-usage {
    display: inline-block;
    padding: 3px 8px;
    background-color: #f0f0f0;
    border-radius: 3px;
    font-weight: bold;
    color: #0073aa;
}

/* Token usage bar shortcode */
.tt-shortcode-token-usage-bar {
    margin: 10px 0;
}

/* Diagnostic shortcode */
.tt-diagnostic-shortcode {
    position: relative;
    display: inline-block;
}

.tt-diagnostic-shortcode-info {
    position: absolute;
    top: -20px;
    left: 0;
    font-size: 10px;
    color: #999;
    background-color: #f0f0f0;
    padding: 2px 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    z-index: 100;
}

/* Diagnostic footer */
.tt-diagnostic-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f0f0f0;
    border-top: 1px solid #ccc;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
}

.tt-diagnostic-footer-toggle {
    padding: 5px 10px;
    cursor: pointer;
    background-color: #f0f0f0;
    border-top: 1px solid #ccc;
    border-right: 1px solid #ccc;
    display: inline-block;
}

.tt-diagnostic-footer-content {
    display: none;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.tt-diagnostic-footer-section {
    margin-bottom: 20px;
}

.tt-diagnostic-footer-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
}

.tt-diagnostic-footer-section table {
    width: 100%;
    border-collapse: collapse;
}

.tt-diagnostic-footer-section table th,
.tt-diagnostic-footer-section table td {
    padding: 5px;
    text-align: left;
    border-bottom: 1px solid #ccc;
    font-size: 12px;
}

.tt-diagnostic-footer-section table th {
    width: 150px;
    font-weight: bold;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .tt-token-stat {
        flex: 100%;
        margin-right: 0;
    }
}
