@charset "UTF-8";

.pdbm-main-layout,
.pdbm-input-col,
.pdbm-result-col,
.pdbm-input-section,
.pdbm-input-grid,
.pdbm-input-group,
.pdbm-input,
.pdbm-chip-group,
.pdbm-btn-row,
.pdbm-support-grid,
.pdbm-support-card,
.pdbm-table-section,
.pdbm-table-wrap,
.pdbm-reference,
.pdbm-disclaimer,
.pdbm-input-unit-row,
.pdbm-unit-chip {
    box-sizing: border-box;
    max-width: 100%;
}

.pdbm-main-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.pdbm-input-col {
    position: sticky;
    top: 20px;
    min-width: 0;
}

.pdbm-result-col {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.pdbm-input-section,
.pdbm-result-hero,
.pdbm-support-card,
.pdbm-table-section,
.pdbm-section {
    border: 1px solid #dbe3f5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(42, 54, 84, 0.06);
}

.pdbm-input-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.pdbm-input-title,
.pdbm-table-title,
.pdbm-reference-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #22304a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdbm-input-title i,
.pdbm-table-title i,
.pdbm-reference-title i {
    color: #4f46e5;
}

.pdbm-intro,
.pdbm-note,
.pdbm-table-help,
.pdbm-hero-subtext {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #596780;
}

.pdbm-input-grid,
.pdbm-chip-section {
    display: grid;
    gap: 10px;
}

.pdbm-input-group {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.pdbm-label,
.pdbm-chip-title,
.pdbm-support-label,
.pdbm-hero-eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #4b5c77;
}

.pdbm-input-unit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.pdbm-input,
.pdbm-input-group select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #cfd7e8;
    border-radius: 8px;
    background: #fff;
    color: #22304a;
    font-size: 13px;
    line-height: 1.4;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.pdbm-input:hover,
.pdbm-input-group select:hover {
    border-color: #9aa8f8;
}

.pdbm-input:focus,
.pdbm-input-group select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.pdbm-input[aria-invalid="true"] {
    border-color: #c65b49;
    box-shadow: 0 0 0 3px rgba(198, 91, 73, 0.12);
    background: #fff8f6;
}

.pdbm-unit-chip {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #d8def0;
    background: #f4f7ff;
    color: #43516a;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pdbm-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pdbm-chip {
    min-height: 40px;
    border: 1px solid #d8def0;
    background: #f4f7ff;
    color: #43516a;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pdbm-chip:hover,
.pdbm-chip:focus-visible {
    border-color: #4f46e5;
    color: #312e81;
    background: #fff;
    outline: none;
    transform: translateY(-1px);
}

.pdbm-chip.active {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #3730a3;
}

.pdbm-btn-row {
    display: grid;
    gap: 8px;
}

.pdbm-btn-row .tool-btn {
    width: 100%;
    min-width: 0;
}

.pdbm-btn-row.is-realtime .tool-btn {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

.pdbm-result-hero {
    padding: 20px;
    background: linear-gradient(135deg, #f5f8ff 0%, #eef2ff 100%);
    border-color: #cdd8ff;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
    display: grid;
    gap: 8px;
}

.pdbm-hero-eyebrow {
    color: #4338ca;
}

.pdbm-hero-value {
    font-size: clamp(22px, 3.4vw, 30px);
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #1f2937;
    word-break: break-word;
}

.pdbm-support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.pdbm-support-card {
    padding: 16px;
    display: grid;
    gap: 6px;
}

.pdbm-support-card.is-highlight {
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
    border-color: #cdd8ff;
}

.pdbm-support-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.35;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.pdbm-table-section {
    padding: 18px;
    display: grid;
    gap: 10px;
}

.pdbm-table-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pdbm-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e1e7f5;
}

.pdbm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
    background: #fff;
}

.pdbm-table th,
.pdbm-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e7ecf7;
    text-align: left;
    font-size: 13px;
    color: #22304a;
    vertical-align: middle;
}

.pdbm-table thead th {
    background: #f6f8ff;
    color: #4b5c77;
    font-size: 12px;
    font-weight: 600;
}

.pdbm-table tbody tr:nth-child(even) {
    background: #fafbff;
}

.pdbm-table tbody tr:last-child th,
.pdbm-table tbody tr:last-child td {
    border-bottom: 0;
}

.pdbm-copy-btn {
    min-width: 64px;
    min-height: 34px;
    border: 1px solid #d8def0;
    border-radius: 999px;
    background: #fff;
    color: #43516a;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.pdbm-copy-btn:hover,
.pdbm-copy-btn:focus-visible {
    border-color: #4f46e5;
    color: #3730a3;
    background: #eef2ff;
    outline: none;
}

.pdbm-copy-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pdbm-copy-btn.is-copied {
    border-color: #4f46e5;
    background: #e0e7ff;
    color: #312e81;
}

.pdbm-section {
    padding: 18px;
}

.pdbm-reference-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: #46556d;
    font-size: 13px;
    line-height: 1.6;
}

.pdbm-disclaimer {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f5f7fb;
    border: 1px solid #e1e7f5;
    color: #596780;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.6;
}

.pdbm-disclaimer i {
    color: #4f46e5;
    margin-top: 2px;
}

@media (max-width: 1024px) {
    .pdbm-main-layout {
        grid-template-columns: 1fr;
    }

    .pdbm-input-col {
        position: static;
    }
}

@media (max-width: 768px) {
    .pdbm-btn-row {
        grid-template-columns: 1fr;
    }

    .pdbm-table-wrap {
        overflow-x: visible;
    }

    .pdbm-table {
        min-width: 0;
        table-layout: fixed;
    }

    .pdbm-table th,
    .pdbm-table td {
        padding: 10px 8px;
        font-size: 12px;
        word-break: break-word;
    }

    .pdbm-table thead th:last-child,
    .pdbm-table tbody td:last-child {
        width: 84px;
    }

    .pdbm-copy-btn {
        min-width: 0;
        width: 100%;
        padding: 8px 6px;
        font-size: 10px;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .pdbm-input-section,
    .pdbm-result-hero,
    .pdbm-table-section,
    .pdbm-section {
        padding: 16px;
    }

    .pdbm-hero-value {
        font-size: 22px;
    }

    .pdbm-support-grid {
        grid-template-columns: 1fr;
    }

    .pdbm-table th,
    .pdbm-table td {
        padding: 9px 6px;
        font-size: 11px;
    }

    .pdbm-table thead th:last-child,
    .pdbm-table tbody td:last-child {
        width: 76px;
    }

    .pdbm-copy-btn {
        padding: 7px 4px;
        font-size: 9px;
    }
}
