/* WordCounter.css - Calculator-specific styles ONLY */
/* Global classes (.glass-card, .btn-custom, .form-input, etc.) are defined in layout.css */

/* Text Input Area */
.text-input-container {
    position: relative;
    margin-bottom: 20px;
}

#textInput {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #48bb78;
    border-radius: 12px;
    font-family: 'Noto Sans TC', 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
}

#textInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Target Word Count Input */
.target-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.target-input-group input {
    flex: 1;
    max-width: 150px;
}

/* Progress Bar */
.progress-container {
    margin-top: 15px;
}

.progress-bar-wrapper {
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    min-width: 0;
}

.progress-bar-fill.complete {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.progress-bar-fill.over {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Statistics Display */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 15px;
}

.stat-label i {
    color: #667eea;
    width: 20px;
}

.stat-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.stat-subvalue {
    font-size: 13px;
    color: #888;
    margin-left: 5px;
    font-weight: 400;
}

/* Platform Limit Indicators */
.platform-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.platform-item:last-child {
    border-bottom: none;
}

.platform-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 14px;
}

.platform-name i {
    width: 20px;
    color: #667eea;
}

.platform-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
}

.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.safe {
    background: #d4edda;
    color: #155724;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.danger {
    background: #f8d7da;
    color: #721c24;
}

/* Word Frequency Chart */
.chart-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    min-height: 300px;
}

.frequency-table {
    width: 100%;
    margin-top: 15px;
}

.frequency-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    gap: 10px;
}

.frequency-rank {
    width: 30px;
    text-align: center;
    font-weight: 700;
    color: #667eea;
    font-family: 'Roboto Mono', monospace;
}

.frequency-word {
    flex: 1;
    font-family: 'Noto Sans TC', 'Roboto', sans-serif;
    color: #333;
}

.frequency-bar-container {
    flex: 2;
    height: 24px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.frequency-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 12px;
}

.frequency-count {
    width: 50px;
    text-align: right;
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    color: #667eea;
}

/* Time Estimates Display */
.time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.time-item:last-child {
    border-bottom: none;
}

.time-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 15px;
}

.time-label i {
    color: #667eea;
    width: 20px;
}

.time-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

/* Action Buttons Row (additional styling) */
.action-buttons-row {
    margin-top: 10px;
}

.btn-copy,
.btn-clear,
.btn-export {
    width: 100%;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Tooltip Icon */
.tooltip-icon {
    color: #888;
    font-size: 14px;
    cursor: help;
    margin-left: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #textInput {
        min-height: 300px;
        font-size: 15px;
    }

    .stat-value {
        font-size: 18px;
    }

    .target-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .target-input-group input {
        max-width: 100%;
    }

    .platform-status {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }

    .frequency-row {
        font-size: 14px;
    }

    .frequency-word {
        flex: 0.8;
    }

    .frequency-bar-container {
        flex: 1.2;
    }
}

@media (max-width: 480px) {
    #textInput {
        min-height: 250px;
        font-size: 14px;
        padding: 12px;
    }

    .stat-item,
    .platform-item,
    .time-item {
        padding: 10px 0;
    }

    .stat-label,
    .platform-name,
    .time-label {
        font-size: 13px;
    }

    .stat-value {
        font-size: 16px;
    }

    .chart-container {
        padding: 15px;
    }
}
