/* CleanTextFormatter.css - Calculator-specific styles only
 * DO NOT redefine global classes: .glass-card, .form-input, .btn-custom, .btn-sponsor, etc.
 * See GLOBAL_CSS_CLASSES.md for complete list of global classes
 */

/* ==========================================
   Text Areas (Calculator-specific)
   ========================================== */

.text-area-container {
    position: relative;
}

.clean-textarea {
    width: 100%;
    min-height: 250px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafbfc;
}

.clean-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fff;
}

.clean-textarea.input-area {
    border-color: #48bb78;
}

.clean-textarea.input-area:focus {
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.clean-textarea.output-area {
    background: #f0fff4;
    border-color: #68d391;
}

.clean-textarea.output-area:focus {
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

/* Character count display */
.char-count-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #4a5568;
}

.char-count-display .count-value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    color: #667eea;
}

.char-count-display .count-reduced {
    color: #48bb78;
    font-weight: 600;
}

/* ==========================================
   Copy Button (Large, prominent)
   ========================================== */

.copy-btn-large {
    width: 100%;
    padding: 18px 24px;
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.copy-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.copy-btn-large:active {
    transform: translateY(0);
}

.copy-btn-large.copied {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.copy-btn-large i {
    font-size: 1.3rem;
}

/* ==========================================
   Cleaning Options
   ========================================== */

.cleaning-option {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f7fafc;
    border-radius: 10px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.cleaning-option:hover {
    background: #edf2f7;
}

.cleaning-option:last-child {
    margin-bottom: 0;
}

.cleaning-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.cleaning-option-content {
    flex: 1;
}

.cleaning-option-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cleaning-option-desc {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.4;
}

.cleaning-option .tooltip-icon {
    color: #a0aec0;
    font-size: 0.85rem;
    cursor: help;
}

/* Optional options (visually distinct) */
.cleaning-option.option-optional {
    background: #fffaf0;
    border: 1px dashed #f59e0b;
}

.cleaning-option.option-optional:hover {
    background: #fef3c7;
}

/* ==========================================
   Statistics Display
   ========================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    padding: 15px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 10px;
    text-align: center;
}

.stat-card-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 5px;
}

.stat-card-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.stat-removed .stat-card-value {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.stat-rate .stat-card-value {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   Clear Input Button (small X)
   ========================================== */

.clear-input-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: #718096;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
}

.text-area-container:hover .clear-input-btn,
.clear-input-btn:focus {
    opacity: 1;
}

.clear-input-btn:hover {
    background: #e53e3e;
    color: white;
}

/* ==========================================
   Empty State
   ========================================== */

.empty-output {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #a0aec0;
    text-align: center;
    padding: 30px;
}

.empty-output i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-output p {
    font-size: 1rem;
    margin: 0;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 991px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .clean-textarea {
        min-height: 180px;
        font-size: 0.95rem;
    }

    .copy-btn-large {
        padding: 15px 20px;
        font-size: 1.1rem;
    }

    .cleaning-option {
        padding: 10px 12px;
    }

    .stat-card-value {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}
