/* static/css/sql_formatter.css
   SQL整形ツール専用の独自CSS(他ツールのCSSは読み込まない・共有しない)。 */

.breadcrumbs {
    margin: 1rem 0 1.25rem;
    font-size: .875rem;
    text-align: left;
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
    content: ">";
    margin-left: .375rem;
    color: #666;
}
.breadcrumbs a {
    color: #0066cc;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs span[aria-current="page"] {
    color: #333;
    font-weight: 600;
}

.sqlf-page {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
    box-sizing: border-box;
    background: #f6f8fb;
    font-family: 'M PLUS 1p', 'Sawarabi Gothic', sans-serif;
    line-height: 1.7;
    color: #1f2a44;
}
.sqlf-page h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin: 1.5rem 0 0.6rem;
    color: #111827;
}
.sqlf-page section {
    margin: 2rem 0 0;
}
.sqlf-page section > p {
    margin: 0 0 0.9rem;
    color: #4b5563;
}
.sqlf-page h2 {
    font-size: 1.15rem;
    margin: 0 0 0.9rem;
    color: #222222;
}
.sqlf-lead {
    color: #4b5563;
    font-size: 1rem;
    margin: 0 0 1.5rem;
}

.sqlf-tool-panel {
    margin: 1.25rem 0 1.75rem;
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: 0 0.125rem 0.5rem rgba(15, 23, 42, 0.08);
}
.sqlf-tool-panel__notice {
    margin: 0;
    padding: 1rem;
    border: 1px dashed #c9d1e4;
    border-radius: 0.5rem;
    background: #f7f8fb;
    color: #555;
    text-align: center;
}

.sqlf-field {
    margin-bottom: 1rem;
}
.sqlf-field label,
.sqlf-output-wrap > label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.4rem;
}
.sqlf-textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: Consolas, Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.75rem 0.9375rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #1f2a44;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sqlf-textarea:focus {
    outline: none;
    border-color: #9eb8ef;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.18);
}
.sqlf-textarea--output {
    background: #f8fbff;
}

.sqlf-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    background: #fbfdff;
    border: 0.0625rem solid #dbe4f0;
    border-radius: 0.875rem;
}
.sqlf-options__radio {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
}
.sqlf-options__radio input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #2f6ae6;
}
.sqlf-options select {
    font: inherit;
    padding: 0.5rem 0.7rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.5rem;
    background: #fff;
    color: #1f2a44;
}
.sqlf-options select:focus {
    outline: none;
    border-color: #9eb8ef;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.18);
}

.sqlf-error {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #b42318;
    background: #fffafa;
    border: 0.0625rem solid #f1c0c0;
    border-radius: 0.75rem;
    padding: 0.75rem 0.9375rem;
    font-size: 0.875rem;
    margin: 0 0 1rem;
}
.sqlf-error::before {
    content: "⚠";
    flex: 0 0 auto;
}
.sqlf-error:empty {
    display: none;
}

.sqlf-output-wrap {
    position: relative;
}
.sqlf-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    margin-top: 0.6rem;
    border: 0.0625rem solid #2f6ae6;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #2f6ae6;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.sqlf-copy-btn:hover {
    background: #eef4ff;
    transform: translateY(-0.0625rem);
}
.sqlf-copy-btn.is-copied {
    background: #2f6ae6;
    border-color: #2f6ae6;
    color: #fff;
}

/* よくある質問(アコーディオン) */
.sqlf-faq-list {
    margin: 1.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.sqlf-faq-item {
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.875rem;
    background: #ffffff;
    overflow: hidden;
}
.sqlf-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border: 0;
    background: #fbfdff;
    cursor: pointer;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.6;
    color: #1f2a44;
    text-align: left;
    transition: background-color 0.15s ease;
}
.sqlf-faq-question:hover {
    background: #eef4ff;
}
.sqlf-faq-question:focus-visible {
    outline: 0.125rem solid #2f6ae6;
    outline-offset: -0.125rem;
}
.sqlf-faq-question__mark {
    flex: 0 0 auto;
    color: #2f6ae6;
    font-weight: 700;
}
.sqlf-faq-question__icon {
    position: relative;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
}
.sqlf-faq-question__icon::before,
.sqlf-faq-question__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: #2f6ae6;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.sqlf-faq-question__icon::before {
    width: 1rem;
    height: 0.14rem;
}
.sqlf-faq-question__icon::after {
    width: 0.14rem;
    height: 1rem;
}
.sqlf-faq-item.is-open .sqlf-faq-question__icon::after {
    transform: translate(-50%, -50%) rotate(90deg) scaleY(0);
    opacity: 0;
}
.sqlf-faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}
.sqlf-faq-item.is-open .sqlf-faq-answer {
    grid-template-rows: 1fr;
}
.sqlf-faq-answer__inner {
    overflow: hidden;
}
.sqlf-faq-answer p {
    margin: 0;
    padding: 0 1.1rem 1rem;
    line-height: 1.8;
    color: #4b5563;
}
@media (max-width: 36rem) {
    .sqlf-faq-question {
        padding: 0.8rem 0.9rem;
        font-size: 0.875rem;
    }
    .sqlf-faq-answer p {
        padding: 0 0.9rem 0.9rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 36rem) {
    .sqlf-page h1 {
        font-size: 1.5rem;
    }
    .sqlf-tool-panel {
        padding: 1rem 0.9rem 1.25rem;
        border-radius: 1rem;
    }
}

/* 関連コラムのカード */
.sqlf-other-tools {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.sqlf-other-tools__card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid #d9deea;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #222;
    background: #fff;
}
.sqlf-other-tools__card:hover { background: #f7f8fb; }
.sqlf-other-tools__title { font-weight: 600; }
.sqlf-other-tools__more { color: #1d4ed8; font-size: 0.875rem; white-space: nowrap; }
