/**
 * JS Beautifier Styles
 * JSビューティファイアー用スタイル
 *
 * @package Zipper
 */

/* オプション領域 */
.beautifier-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f5f3ef;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.beautifier-options-label {
    font-weight: 600;
    color: #2d2a26;
    font-size: 0.875rem;
    white-space: nowrap;
}

.beautifier-options-group {
    display: flex;
    gap: 0.5rem;
}

.indent-option {
    padding: 0.5rem 1rem;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #fff;
    color: #5f5a56;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.indent-option:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.indent-option.active {
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    border-color: #d4af37;
    color: #fff;
}

@media (max-width: 480px) {
    .beautifier-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .beautifier-options-group {
        width: 100%;
    }

    .indent-option {
        flex: 1;
        text-align: center;
        padding: 0.625rem 0.5rem;
    }
}

/* メイン領域 */
.beautifier-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .beautifier-area {
        grid-template-columns: 1fr;
    }
}

/* パネル */
.beautifier-panel {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    overflow: hidden;
}

.beautifier-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: #f5f3ef;
    border-bottom: 1px solid #e8e4dc;
}

.beautifier-panel-label {
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.beautifier-panel-label i {
    color: #d4af37;
}

.beautifier-panel-actions {
    display: flex;
    gap: 0.5rem;
}

.panel-action-btn {
    background: transparent;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    color: #5f5a56;
    transition: all 0.2s ease;
}

.panel-action-btn:hover {
    background: #fff;
    border-color: #d4af37;
    color: #d4af37;
}

.sample-btn {
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    border: none;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.sample-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* テキストエリア */
.beautifier-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: none;
    background: #fff;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    color: #2d2a26;
}

.beautifier-textarea:focus {
    outline: none;
    background: #fffef8;
}

.beautifier-textarea::placeholder {
    color: #a09a94;
}

/* 統計セクション */
.beautifier-stats {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1.25rem;
    background: #f5f3ef;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.beautifier-stats.active {
    display: flex;
}

@media (max-width: 480px) {
    .beautifier-stats {
        gap: 1rem;
        flex-wrap: wrap;
    }
}

.beautifier-stat {
    text-align: center;
}

.beautifier-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d2a26;
    font-family: 'Consolas', monospace;
}

.beautifier-stat-value.highlight {
    color: #d4af37;
}

.beautifier-stat-label {
    font-size: 0.8125rem;
    color: #5f5a56;
    margin-top: 0.25rem;
}

.beautifier-stat-divider {
    width: 1px;
    height: 40px;
    background: #e8e4dc;
}

@media (max-width: 480px) {
    .beautifier-stat-divider {
        display: none;
    }
}

/* エラーメッセージ */
.beautifier-error {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #dc2626;
}

.beautifier-error.active {
    display: flex;
}

.beautifier-error i {
    font-size: 1.25rem;
}
