/**
 * Molecular Weight Calculator Styles
 * 분자량 계산기 전용 스타일
 *
 * @package Zipper
 */

.mwc-hidden,
.mwc-waiting[hidden] {
    display: none !important;
}

.mwc-intro {
    display: grid;
    gap: 10px;
}

.mwc-lead {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.6;
    color: #5f5a56;
}

.mwc-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.mwc-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.mwc-section-title,
.mwc-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
}

.mwc-section-title i,
.mwc-subtitle i {
    color: #d4af37;
}

.mwc-section-copy {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #5f5a56;
}

.mwc-input-section {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.mwc-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 100%;
    box-sizing: border-box;
}

.mwc-input-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

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

.mwc-formula-row {
    align-items: stretch;
}

.mwc-formula-input,
.mwc-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 500;
    color: #2d2a26;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mwc-formula-input:hover,
.mwc-select:hover {
    border-color: #d4c67a;
}

.mwc-formula-input:focus,
.mwc-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.mwc-formula-input::placeholder {
    font-weight: 400;
    color: #c4c0bc;
}

.mwc-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e8e4dc;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.mwc-input-hint {
    font-size: 13px;
    line-height: 1.5;
    color: #7a756d;
}

.mwc-preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mwc-preset-btn {
    padding: 9px 14px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #fff;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mwc-preset-btn:hover,
.mwc-preset-btn.is-active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
}

.mwc-btn-group {
    display: flex;
    gap: 8px;
}

.mwc-btn-group .tool-btn {
    flex: 1 1 0;
}

.mwc-tip-section {
    background: #fffdf9;
}

.mwc-tip-list,
.mwc-note-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: #5f5a56;
    font-size: 14px;
    line-height: 1.6;
}

.mwc-waiting {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #eadfb8;
    background: #fffaf0;
    color: #7a5d18;
}

.mwc-waiting i {
    color: #d4af37;
    font-size: 18px;
    margin-top: 2px;
}

.mwc-waiting p {
    margin: 0;
    line-height: 1.6;
}

.mwc-result-hero {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #eadfb8;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.14);
}

.mwc-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mwc-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.mwc-status-badge.is-valid {
    background: rgba(70, 180, 80, 0.12);
    color: #267237;
}

.mwc-status-badge.is-neutral {
    background: rgba(212, 175, 55, 0.14);
    color: #8a6500;
}

.mwc-status-badge.is-warning {
    background: rgba(255, 185, 0, 0.16);
    color: #8a6500;
}

.mwc-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mwc-copy-btn:hover {
    border-color: #d4af37;
    color: #8a6500;
    transform: translateY(-1px);
}

.mwc-formula-display {
    font-size: 15px;
    font-weight: 700;
    color: #8a6500;
    letter-spacing: 0.02em;
    word-break: break-word;
}

.mwc-hero-value-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}

.mwc-hero-value {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #2d2a26;
}

.mwc-hero-unit {
    padding-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #8a6500;
}

.mwc-hero-label {
    font-size: 14px;
    font-weight: 600;
    color: #5f5a56;
}

.mwc-hero-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #5f5a56;
}

.mwc-formula-box {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.6;
    color: #5f5a56;
    word-break: break-word;
}

.mwc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.mwc-kpi-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e8e4dc;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.05);
}

.mwc-kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: #7a756d;
}

.mwc-kpi-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
    word-break: break-word;
}

.mwc-contribution-list {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.mwc-contribution-row,
.mwc-empty-state {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #efe8d4;
    background: #fffdf8;
}

.mwc-contribution-head,
.mwc-contribution-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.mwc-contribution-head strong,
.mwc-contribution-foot strong {
    color: #2d2a26;
}

.mwc-contribution-head span,
.mwc-contribution-foot span,
.mwc-empty-state {
    font-size: 13px;
    color: #5f5a56;
    line-height: 1.5;
}

.mwc-contribution-track {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #f3efe4;
}

.mwc-contribution-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d4af37 0%, #e6c458 100%);
}

.mwc-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.mwc-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.mwc-table th,
.mwc-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #efe8d4;
    text-align: left;
    font-size: 14px;
    color: #2d2a26;
    vertical-align: top;
}

.mwc-table thead th {
    font-size: 13px;
    font-weight: 700;
    color: #7a756d;
    background: #faf9f7;
}

.mwc-table tbody th {
    font-weight: 700;
}

.mwc-empty-row td {
    color: #7a756d;
}

@media (max-width: 900px) {
    .mwc-formula-input,
    .mwc-select {
        width: 100% !important;
        max-width: 100% !important;
    }
}

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

    .mwc-kpi-grid {
        grid-template-columns: 1fr;
    }

    .mwc-hero-value {
        font-size: 32px;
    }

    .mwc-table {
        min-width: 520px;
    }
}

@media (max-width: 480px) {
    .tool-section,
    .tool-layout-split,
    .tool-layout-input,
    .tool-layout-result {
        max-width: 100%;
        overflow-x: hidden;
    }

    .mwc-amount-row {
        grid-template-columns: 1fr;
    }

    .mwc-unit-chip {
        justify-self: start;
    }

    .mwc-section,
    .mwc-result-hero,
    .mwc-kpi-card {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mwc-section,
    .mwc-formula-input,
    .mwc-select,
    .mwc-preset-btn,
    .mwc-copy-btn {
        transition: none !important;
    }

    .mwc-section:hover,
    .mwc-copy-btn:hover {
        transform: none !important;
    }
}
