/* Disclosure page (情報公開). */

.dc-title-band-wrap,
.ab-main.dc-main {
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    box-sizing: border-box;
}
@supports not (overflow-x: clip) {
    .dc-title-band-wrap,
    .ab-main.dc-main { overflow-x: hidden; }
}
.dc-main img { max-width: 100%; height: auto; }
.dc-section-title,
.dc-table th,
.dc-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dc-title-band-wrap {
    max-width: 1280px;
    margin: 24px auto 0;
    padding: 0 40px;
}

/* Header/breadcrumb/body share the same horizontal grid. */
.sn-breadcrumb-wrap,
.ab-body-layout {
    padding-right: 40px;
    padding-left: 40px;
}
.dc-title-band {
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
    background: #4DB1AF;
    color: #fff;
    font-size: 26px; font-weight: 700;
    line-height: 1.3;
    padding: 18px 48px 18px 28px;
    margin: 0;
}

.dc-main {
    flex: 1;
    min-width: 0;
}
.dc-section {
    margin-bottom: 64px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.dc-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #008F8D;
    margin: 0 0 36px;
}
.dc-section-title::before,
.dc-section-title::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #008F8D;
}
.dc-section-title::before {
    margin-right: 24px;
}
.dc-section-title::after {
    margin-left: 24px;
}

.dc-table-wrap {
    background: #FFFFFF;
    border: 1px solid #EAECF0;
    overflow: hidden;
}

.dc-table {
    width: 100%;
    border-collapse: collapse;
}
.dc-table tr {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #EAECF0;
}
.dc-table tr:last-child {
    border-bottom: none;
}
.dc-table th {
    flex: 7;
    background: #F7F8F9;
    padding: 24px 32px;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.5;
    color: #061C3D;
    text-align: left;
    display: flex;
    align-items: center;
    border: none;
    box-sizing: border-box;
}
.dc-table td {
    flex: 3;
    background: #FFFFFF;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #EAECF0;
    box-sizing: border-box;
}

.dc-pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.dc-pdf-link:not(.disabled):hover {
    transform: scale(1.1);
    opacity: 0.8;
}
.dc-pdf-link.disabled {
    cursor: not-allowed;
    opacity: 0.3;
    filter: grayscale(1);
}
.dc-pdf-link img {
    display: block;
    width: 56px;
    height: auto;
}

@media (max-width: 1024px) {
    .dc-title-band-wrap,
    .sn-breadcrumb-wrap,
    .ab-body-layout {
        padding-right: 20px;
        padding-left: 20px;
    }
    .dc-title-band { font-size: 24px; padding: 17px 44px 17px 26px; }
    .dc-section { margin-bottom: 56px; }
    .dc-section-title { font-size: 24px; margin-bottom: 32px; }
    .dc-table th { font-size: 17px; padding: 22px 28px; }
    .dc-table td { padding: 14px; }
    .dc-pdf-link img { width: 52px; }
}

/* Sidebar collapses at 960px (page-about.css). Match the title-band scale here. */
@media (max-width: 960px) {
    .dc-title-band { font-size: 22px; padding: 16px 40px 16px 24px; }
    .dc-section { margin-bottom: 48px; }
    .dc-section-title { font-size: 22px; margin-bottom: 28px; }
    .dc-table th { font-size: 16px; padding: 20px 24px; }
    .dc-pdf-link img { width: 48px; }
}

@media (max-width: 768px) {
    .dc-title-band { font-size: 20px; padding: 14px 28px 14px 20px; }

    .dc-section { margin-bottom: 36px; }
    .dc-section-title { font-size: 18px; margin-bottom: 22px; }
    .dc-section-title::before,
    .dc-section-title::after { margin: 0 14px; }

    /* Ratio th:5 / td:2 keeps th prominent while leaving icon room. */
    .dc-table th { flex: 5; font-size: 15px; padding: 14px 16px; line-height: 1.5; }
    .dc-table td { flex: 2; padding: 10px 12px; }
    .dc-pdf-link img { width: 44px; }
}

/* Stack cells vertically at 560px so the PDF cell has room with its label. */
@media (max-width: 560px) {
    .dc-title-band-wrap,
    .sn-breadcrumb-wrap,
    .ab-body-layout {
        padding-right: 16px;
        padding-left: 16px;
    }
    .dc-title-band { font-size: 18px; padding: 12px 22px 12px 16px; }
    .dc-section-title { font-size: 16px; margin-bottom: 18px; }
    .dc-section-title::before,
    .dc-section-title::after { margin: 0 10px; }

    .dc-table tr { flex-direction: column; }
    .dc-table th {
        flex: none;
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
    }
    .dc-table td {
        flex: none;
        width: 100%;
        border-left: none;
        border-top: 1px solid #EAECF0;
        padding: 12px 16px;
        justify-content: flex-start;
    }
    .dc-table td::before {
        content: "ダウンロード :";
        font-family: 'Noto Sans JP', sans-serif;
        font-weight: 700;
        font-size: 13px;
        color: #6A778B;
        margin-right: 10px;
    }
    .dc-pdf-link img { width: 40px; }
}

@media (max-width: 420px) {
    .dc-title-band { font-size: 17px; padding: 11px 18px 11px 14px; line-height: 1.35; }
    .dc-section { margin-bottom: 32px; }
    .dc-section-title { font-size: 15px; margin-bottom: 16px; }
    .dc-section-title::before,
    .dc-section-title::after { margin: 0 8px; }
    .dc-table th { font-size: 14px; padding: 11px 14px; }
    .dc-table td { padding: 11px 14px; }
    .dc-table td::before { font-size: 12px; }
    .dc-pdf-link img { width: 36px; }
}

/* iPhone SE 1st-gen and similar. */
@media (max-width: 359px) {
    .dc-title-band { font-size: 15px; padding: 10px 14px 10px 12px; }
    .dc-section-title { font-size: 14px; }
    .dc-section-title::before,
    .dc-section-title::after { margin: 0 6px; }
    .dc-table th { font-size: 13px; padding: 10px 12px; }
    .dc-table td { padding: 10px 12px; }
    .dc-pdf-link img { width: 32px; }
}

/* Editor-only: Gutenberg block layout overrides inside wp-admin.
   Flex 2-column + inner-blocks fill handled by editor-disclosure.css. */
.editor-styles-wrapper .wp-block[data-type="sunatec/dc-body"] {
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
}

.editor-styles-wrapper .dc-body-editor-wrap .dc-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #008F8D;
    margin: 0 0 36px;
}
.editor-styles-wrapper .dc-body-editor-wrap .dc-section-title::before,
.editor-styles-wrapper .dc-body-editor-wrap .dc-section-title::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #008F8D;
}
.editor-styles-wrapper .dc-body-editor-wrap .dc-section-title::before {
    margin-right: 24px;
}
.editor-styles-wrapper .dc-body-editor-wrap .dc-section-title::after {
    margin-left: 24px;
}

.editor-styles-wrapper .dc-table-wrap {
    background: #FFFFFF;
    border: 1px solid #EAECF0;
    overflow: hidden;
}

.editor-styles-wrapper .dc-table-editor > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

.editor-styles-wrapper .wp-block[data-type="sunatec/dc-table-row"] {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
}

.editor-styles-wrapper .dc-row-editor {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #EAECF0;
    min-height: 0;
}
.editor-styles-wrapper .wp-block[data-type="sunatec/dc-table-row"]:last-child .dc-row-editor {
    border-bottom: none;
}

.editor-styles-wrapper .dc-row-editor__th {
    flex: 7;
    background: #F7F8F9;
    padding: 24px 32px;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.5;
    color: #061C3D;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.editor-styles-wrapper .dc-row-editor__td {
    flex: 3;
    background: #FFFFFF;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #EAECF0;
    box-sizing: border-box;
}

.editor-styles-wrapper .dc-row-editor__pdf {
    display: block;
    width: 56px;
    height: auto;
}
.editor-styles-wrapper .dc-row-editor__pdf--disabled {
    opacity: 0.3;
    filter: grayscale(1);
}

.editor-styles-wrapper .wp-block[data-type="sunatec/dc-table-row"].is-selected .dc-row-editor {
    outline: 2px solid #007cba;
    outline-offset: -2px;
}
