/* BrowserScratchpad.css
 * 瀏覽器臨時筆記本 - Calculator-specific styles only
 * Created: 2025-11-28
 *
 * NOTE: Do NOT redefine global classes from layout.css
 * (.glass-card, .form-input, .btn-custom, .btn-sponsor, etc.)
 */

/* ===== Scratchpad Textarea ===== */
.scratchpad-textarea {
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: 2px solid #48bb78;
    border-radius: 12px;
    font-family: 'Noto Sans TC', 'Roboto Mono', monospace;
    font-size: 16px;
    line-height: 1.8;
    resize: vertical;
    background: #fafffe;
    transition: all 0.3s ease;
}

.scratchpad-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #fff;
}

.scratchpad-textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Font size variations */
.scratchpad-textarea.font-small {
    font-size: 14px;
    line-height: 1.6;
}

.scratchpad-textarea.font-medium {
    font-size: 16px;
    line-height: 1.8;
}

.scratchpad-textarea.font-large {
    font-size: 20px;
    line-height: 1.9;
}

.scratchpad-textarea.font-xlarge {
    font-size: 24px;
    line-height: 2;
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item i {
    font-size: 0.85rem;
    opacity: 0.9;
}

.stat-value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

/* ===== Controls Section ===== */
.controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.font-size-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.font-size-control label {
    font-weight: 500;
    color: #4a5568;
    white-space: nowrap;
}

.font-size-select {
    min-width: 100px;
}

/* ===== Tool Buttons ===== */
.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tool-btn.danger {
    border-color: #e53e3e;
    color: #e53e3e;
}

.tool-btn.danger:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border-color: transparent;
}

/* ===== Auto-save Indicator ===== */
.autosave-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #48bb78;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.autosave-indicator.show {
    opacity: 1;
}

.autosave-indicator i {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Storage Warning ===== */
.storage-warning {
    display: none;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f6e05e 0%, #ecc94b 100%);
    border-radius: 8px;
    color: #744210;
    font-size: 0.9rem;
    margin-top: 15px;
}

.storage-warning.show {
    display: flex;
    align-items: center;
    gap: 10px;
}

.storage-warning i {
    font-size: 1.1rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .scratchpad-textarea {
        min-height: 300px;
        padding: 15px;
    }

    .stats-bar {
        gap: 10px;
    }

    .stat-item {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .font-size-control {
        justify-content: space-between;
    }

    .tool-btn {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .scratchpad-textarea {
        min-height: 250px;
        font-size: 14px;
    }

    .scratchpad-textarea.font-xlarge {
        font-size: 20px;
    }

    .stat-item {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }
}
