/*
 * KobakoWorks Download
 * Public download cards
 */

.kbw-download-release,
.kbw-old-versions .kbw-old-release {
    box-sizing: border-box;
    margin: 2.5rem 0;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .05);
}

.kbw-download-release *,
.kbw-old-versions .kbw-old-release * {
    box-sizing: border-box;
}

.kbw-download-release > h2 {
    margin: 0 0 1.5rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid #dbe3ec;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.5;
}

.kbw-download-release > p {
    margin: .65rem 0;
    line-height: 1.8;
}

.kbw-download-release > p > strong {
    display: block;
    margin-bottom: .75rem;
    color: #0f172a;
    font-size: 1.2rem;
}

.kbw-download-release > h3 {
    margin: 1.5rem 0 .65rem;
    font-size: 1rem;
}

.kbw-download-action,
.kbw-old-download-action {
    margin: 1.8rem 0 .5rem !important;
}

.kbw-download-button,
.kbw-old-download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    width: 100%;
    min-height: 58px;
    padding: .9rem 1.25rem;
    border: 1px solid #1d4ed8;
    border-radius: 10px;
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .2);
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none !important;
    transition:
        background .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.kbw-download-button::before,
.kbw-old-download-button::before {
    content: "";
    display: inline-block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m-5-5 5 5 5-5M5 17v4h14v-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.kbw-download-button:hover,
.kbw-old-download-button:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
    color: #fff !important;
    transform: translateY(-1px);
}

.kbw-download-button:focus-visible,
.kbw-old-download-button:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

.kbw-old-versions-link {
    margin-top: 1.3rem !important;
    text-align: center;
}

.kbw-old-versions-link a {
    color: #2563eb;
    font-weight: 600;
}

.kbw-old-versions {
    width: min(100% - 32px, 860px);
    margin: 3rem auto;
}

.kbw-old-versions > h1 {
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.kbw-old-versions > p > a {
    color: #2563eb;
}

.kbw-old-release > h2 {
    margin: 0 0 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #dbe3ec;
    font-size: 1.2rem;
}

.kbw-old-release > p {
    margin: .8rem 0;
}

.kbw-old-notes {
    margin: 1rem 0;
    line-height: 1.8;
    white-space: normal;
}

@media (max-width: 600px) {
    .kbw-download-release,
    .kbw-old-versions .kbw-old-release {
        margin: 1.75rem 0;
        padding: 1.25rem;
        border-radius: 12px;
    }

    .kbw-download-release > h2 {
        font-size: 1.2rem;
    }

    .kbw-download-button,
    .kbw-old-download-button {
        min-height: 54px;
        padding: .85rem 1rem;
        font-size: .95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kbw-download-button,
    .kbw-old-download-button {
        transition: none;
    }

    .kbw-download-button:hover,
    .kbw-old-download-button:hover {
        transform: none;
    }
}

/* STEP947 MULTIZIP CSS START */

/* 複数ZIP配布専用。既存の単一ZIP表示は変更しない。 */
.kbw-multi-zip-downloads {
    margin: 1.5rem 0;
}

.kbw-multi-zip-downloads > h3 {
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
}

.kbw-multi-zip-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kbw-multi-zip-list > .kbw-multi-zip-item {
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

.kbw-multi-zip-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    min-height: 4.5rem;
    padding: 0.9rem 1.1rem;
    box-sizing: border-box;
    border: 1px solid #225e9e;
    border-radius: 0.55rem;
    background: #246bb3;
    color: #fff;
    text-decoration: none;
    line-height: 1.45;
    overflow-wrap: anywhere;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.kbw-multi-zip-button:hover {
    background: #194d84;
    border-color: #194d84;
    color: #fff;
    text-decoration: none;
}

.kbw-multi-zip-button:focus-visible {
    outline: 3px solid #f2a900;
    outline-offset: 3px;
}

.kbw-multi-zip-label {
    display: block;
    font-weight: 700;
    font-size: 1rem;
}

.kbw-multi-zip-size {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .kbw-multi-zip-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .kbw-multi-zip-button {
        min-height: 4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kbw-multi-zip-button {
        transition: none;
    }
}

/* STEP947 MULTIZIP CSS END */
/* STEP1420: VELQENARO sales buttons */
.vqc-sales-links {
    margin: 1.5rem 0;
}

.vqc-sales-links > h3 {
    margin: 0 0 .85rem;
    font-size: 1.1rem;
}

.vqc-sales-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.vqc-sales-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: .9rem 1.1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #334155 !important;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none !important;
    overflow-wrap: anywhere;
    transition: background .2s ease, border-color .2s ease;
}

.vqc-sales-button:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a !important;
}

.vqc-sales-button:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .vqc-sales-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vqc-sales-button {
        transition: none;
    }
}

/* STEP1627 CONNECT DISPLAY ADJUSTMENTS */

/* Download heading: keep a simple bottom divider without theme decoration. */
.kbw-download-release > h2 {
    position: relative;
    margin: 0 0 1.5rem;
    padding: 0 0 1rem;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid #dbe3ec;
    background: transparent;
    box-shadow: none;
    color: #0f172a;
}

.kbw-download-release > h2::before,
.kbw-download-release > h2::after {
    content: none;
    display: none;
}

/* ZIP registration time. */
.kbw-multi-zip-date {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
}


/* STEP1652 OLD VERSION BUTTON */
.kbw-old-versions-link {
    margin: 24px 0 32px;
    text-align: center;
}

.kbw-old-versions-link > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    width: min(100%, 380px);
    min-height: 52px;
    padding: 12px 20px;
    border: 1px solid #a9c8ed;
    border-radius: 8px;
    background: #edf5ff;
    color: #2168b6;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
    transition: background-color .2s ease, border-color .2s ease;
}

.kbw-old-versions-link > a::before {
    content: "↺";
    font-size: 18px;
    line-height: 1;
}

.kbw-old-versions-link > a::after {
    content: "›";
    font-size: 22px;
    line-height: 1;
}

.kbw-old-versions-link > a:hover,
.kbw-old-versions-link > a:focus-visible {
    background: #dcecff;
    border-color: #4385cf;
    color: #174e8b;
    text-decoration: none;
}

.kbw-old-versions-link > a:focus-visible {
    outline: 2px solid #2168b6;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .kbw-old-versions-link > a {
        width: 100%;
    }
}
