/**
 * Void Ground - Shard Synthesizer Stylesheet
 * Leonardo da Vinci Manuscript Alchemical Transmutation Theme
 */

.synth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #100804 url('assets/wood-table.jpg') center center / cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500;
    padding: 16px;
    box-sizing: border-box;
}

.synth-modal-overlay.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.synth-ledger-box {
    position: relative;
    width: 1678px;
    /* +10% from 1525px */
    max-width: 98vw;
    height: 924px;
    /* +10% from 840px */
    max-height: 96vh;
    background: #e8d7b8 url('assets/deckle-paper.jpg') repeat;
    background-size: cover;
    border: 2px solid #5a3e1b;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 60px rgba(90, 56, 20, 0.35);
    display: flex;
    flex-direction: column;
    padding: 16px 28px;
    box-sizing: border-box;
    font-family: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
    color: #2b1d0c;
}

/* Header */
.synth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #7c5828;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.synth-title-group h2 {
    margin: 0;
    font-size: 32.5px;
    letter-spacing: 2px;
    font-weight: 800;
    color: #3b230f;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.synth-ledger-box .inv-close-btn {
    background: #451a03;
    border: 2.5px solid #8c5d2e;
    border-radius: 50%;
    width: 63px;
    height: 63px;
    min-width: 63px;
    min-height: 63px;
    cursor: pointer;
    font-size: 38px;
    line-height: 1;
    color: #fef3c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(69, 26, 3, 0.45);
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.synth-ledger-box .inv-close-btn:hover {
    background: #78350f;
    color: #ffffff;
    border-color: #b45309;
    transform: rotate(90deg) scale(1.06);
}

.synth-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.synth-storage-status {
    display: none !important;
}

.synth-gold-badge {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 22px; /* Scaled +30% from 16px */
    font-weight: 900;
    color: #451a03;
    background: transparent;
    border: none;
    padding: 0 4px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: none;
    letter-spacing: 0.5px;
}

/* 5 Shard Selection Tabs (+25% scaling) */
.synth-shard-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.synth-shard-tab {
    flex: 1;
    background: rgba(210, 185, 144, 0.4);
    border: 1.8px solid #8e6a39;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    min-height: 90px;
    box-sizing: border-box;
}

.synth-shard-tab:hover {
    background: rgba(225, 205, 170, 0.7);
    border-color: #b89355;
    transform: translateY(-1px);
}

.synth-shard-tab.active {
    background: #f4e8d0;
    border-color: #5a3818;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), inset 0 0 8px rgba(184, 147, 85, 0.25);
    font-weight: bold;
}

/* Shard Crystal Image (+25% scaling) */
.synth-tab-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #110e0a;
    border: 1.5px solid #7c5828;
    border-radius: 6px;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5), 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 3px;
    flex-shrink: 0;
}

.synth-tab-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.synth-tab-title {
    font-size: 19px;
    color: #2b1d0c;
    letter-spacing: 0.6px;
    font-weight: 800;
}

.synth-tab-badge {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 6px;
    background: #18120c;
    border: 1.5px solid #6b4c27;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    text-shadow: none;
    line-height: 1.2;
}

/* 3 Recipe Sub-Buttons (+25% scaling) */
.synth-recipe-selector-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    background: rgba(180, 150, 110, 0.2);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(124, 88, 40, 0.35);
}

.synth-recipe-btn {
    flex: 1;
    background: #dfcdab;
    border: 1.5px solid #8e6a39;
    border-radius: 6px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    min-height: 60px;
    box-sizing: border-box;
}

.synth-recipe-btn:hover {
    background: #eedebd;
    border-color: #b89355;
}

.synth-recipe-btn.active {
    background: #fff6e0;
    border-color: #5a3818;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 2px 5px rgba(0, 0, 0, 0.15);
}

.synth-recipe-btn-title {
    font-size: 23px; /* Enlarged per user instruction */
    font-weight: 800;
    color: #2b1d0c;
    display: block;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.synth-recipe-btn-subtitle {
    display: none !important; /* "tidak usah ada tulisan total Mol , jadi label Resep .... bisa lebih besar" */
}

/* Active Recipe Workspace */
.synth-recipe-detail-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(220, 200, 165, 0.3);
    border: 1.8px solid #8e6a39;
    border-radius: 8px;
    padding: 16px 22px;
    box-sizing: border-box;
    overflow: hidden; /* Zero scroll */
}

.synth-recipe-detail-box::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.synth-recipe-meta-header {
    margin-bottom: 12px;
    border-bottom: 1.5px dashed rgba(124, 88, 40, 0.45);
    padding-bottom: 8px;
}

.synth-recipe-name {
    font-size: 22px;
    font-weight: 800;
    color: #3b230f;
    letter-spacing: 1.2px;
}

.synth-stoichiometry-label {
    display: none !important;
}

/* Required Molecules & Catalyst Grid - Centered & Symmetric */
.synth-molecules-grid {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 12px 0;
    width: 100%;
    box-sizing: border-box;
}

.synth-mol-card {
    background: #dfcdab;
    border: 1.8px solid #8e6a39;
    border-radius: 8px;
    padding: 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    flex: 1;
    max-width: 280px;
    min-width: 170px;
    min-height: 240px;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.synth-mol-card.ready {
    border-color: #1b4d2e;
    background: linear-gradient(180deg, rgba(27, 77, 46, 0.08) 0%, #dfcdab 100%);
}

.synth-mol-card.missing {
    border-color: #8c2a1a;
    background: linear-gradient(180deg, rgba(140, 42, 26, 0.08) 0%, #dfcdab 100%);
}

/* Transmutation Catalyst Shard Card */
.synth-mol-card.synth-catalyst-card {
    border-width: 2px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.synth-mol-card.synth-catalyst-card.ready {
    border-color: #1b4d2e;
    background: linear-gradient(180deg, rgba(27, 77, 46, 0.12) 0%, #dfcdab 100%);
}

.synth-mol-card.synth-catalyst-card.missing {
    border-color: #8c2a1a;
    background: linear-gradient(180deg, rgba(140, 42, 26, 0.12) 0%, #dfcdab 100%);
}

.synth-cat-icon-container {
    width: 90px;
    height: 104px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.synth-cat-shard-img {
    width: 78px;
    height: 78px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
    transition: transform 0.2s ease;
}

.synth-mol-card:hover .synth-cat-shard-img {
    transform: scale(1.08);
}

.synth-recipe-plus-sign {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 800;
    color: #63431f;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
    padding: 0 8px;
    align-self: center;
    user-select: none;
    line-height: 1;
}

/* Chemical Storage Identical Bottle Graphic */
.synth-bottle-container {
    width: 90px;
    height: 104px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.synth-bottle-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.synth-bottle-stack-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #251b13;
    border: 1.8px solid #bfa068;
    color: #f7eed8;
    font-size: 16px; /* Scaled +50% from 10px */
    font-weight: 900;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
    z-index: 5;
    pointer-events: none;
    letter-spacing: 0.4px;
    line-height: 1.15;
    white-space: nowrap;
}

.synth-bottle-stack-badge.max {
    background: #7f1d1d;
    border-color: #fde047;
    color: #fef08a;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.55), 0 2px 6px rgba(0, 0, 0, 0.65);
}

.synth-molecule-preview {
    position: absolute;
    top: 66px;
    left: 50%;
    width: 0;
    height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.synth-molecule-preview .molecule {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(0.34) !important;
    transform-origin: center center !important;
    pointer-events: none !important;
    margin: 0 !important;
}

.synth-mol-formula {
    font-size: 20px;
    font-weight: 800;
    color: #2b1d0c;
    letter-spacing: 0.8px;
}

.synth-mol-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #553315;
    margin: 3px 0 8px 0;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.synth-mol-progress-pill {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.synth-mol-progress-pill.ready {
    background: #1b4d2e;
    color: #c7eed3;
}

.synth-mol-progress-pill.missing {
    background: #8c2a1a;
    color: #fbd6d0;
}

/* Transmutation Action Footer */
.synth-footer-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #7c5828;
    padding-top: 14px;
    margin-top: 12px;
}

.synth-summary-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 23.5px; /* Scaled +50% from 15.5px */
    color: #241303;
    font-weight: 700;
    line-height: 1.35;
    flex: 1 1 auto;
    margin-right: 20px;
}

.synth-summary-text b {
    color: #7c2d12;
    font-weight: 900;
}

.synth-execute-btn {
    background: linear-gradient(180deg, #1b4d2e 0%, #113620 100%);
    color: #e8d7b8;
    border: 1.5px solid #285e3a;
    padding: 13px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.5px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    font-family: inherit;
    flex-shrink: 0;
}

.synth-execute-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #24643c 0%, #154628 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.synth-execute-btn:disabled {
    background: #7a7062;
    border-color: #5c544a;
    color: #b5ada3;
    cursor: not-allowed;
    opacity: 0.65;
    box-shadow: none;
    transform: none;
}

/* In-Modal Sleek Toast Notification */
.synth-toast-banner {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: #1b1612;
    border: 2px solid #c9a759;
    color: #f7edd4;
    padding: 10px 24px;
    border-radius: 6px;
    font-family: 'Cinzel', 'Palatino Linotype', Georgia, serif;
    font-size: 13px;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s ease;
    z-index: 10005;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 90%;
    text-align: center;
}

.synth-toast-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.synth-toast-banner.success {
    border-color: #4ade80;
    background: #102416;
    color: #e6f9ed;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.3), 0 10px 30px rgba(0, 0, 0, 0.85);
}

.synth-toast-banner.error {
    border-color: #f87171;
    background: #2b1111;
    color: #fef2f2;
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.3), 0 10px 30px rgba(0, 0, 0, 0.85);
}

.synth-toast-banner.warning {
    border-color: #fbbf24;
    background: #2b2111;
    color: #fffbeb;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3), 0 10px 30px rgba(0, 0, 0, 0.85);
}

/* ============================================================
   Crystal Catalyst Section (Renaissance Alchemical Catalyst Box)
   ============================================================ */
.synth-catalyst-container {
    display: none !important;
    margin-bottom: 8px;
}

.synth-catalyst-box {
    background: #eedebd;
    border: 1.8px solid #8e6a39;
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), inset 0 0 10px rgba(184, 147, 85, 0.15);
    transition: all 0.2s ease;
}

.synth-catalyst-box.ready {
    border-color: #1b4d2e;
    background: linear-gradient(135deg, rgba(27, 77, 46, 0.12) 0%, #eedebd 100%);
    box-shadow: 0 2px 6px rgba(27, 77, 46, 0.2), inset 0 0 10px rgba(27, 77, 46, 0.1);
}

.synth-catalyst-box.missing {
    border-color: #8c2a1a;
    background: linear-gradient(135deg, rgba(140, 42, 26, 0.12) 0%, #eedebd 100%);
    box-shadow: 0 2px 6px rgba(140, 42, 26, 0.2), inset 0 0 10px rgba(140, 42, 26, 0.1);
}

.synth-catalyst-box.starter {
    border-color: #5a7a58;
    background: rgba(220, 235, 220, 0.45);
    padding: 8px 16px;
    border-radius: 8px;
}

.synth-catalyst-icon-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: #110e0a;
    border: 1.5px solid #7c5828;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.15);
}

.synth-catalyst-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.synth-catalyst-qty-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #7c2d12;
    border: 1.5px solid #ffd875;
    color: #fff9e6;
    font-size: 16px; /* Scaled +50% from 10px */
    font-weight: 900;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 2px 7px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.4px;
}

.synth-catalyst-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.synth-catalyst-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.synth-catalyst-title {
    font-size: 15px;
    font-weight: 800;
    color: #3b230f;
    letter-spacing: 0.8px;
}

.synth-catalyst-title.starter {
    color: #1b4d2e;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.synth-catalyst-desc {
    font-size: 12.5px;
    color: #553315;
    font-style: italic;
    line-height: 1.35;
}

.synth-catalyst-desc.starter {
    color: #244b2f;
    font-style: normal;
    font-weight: 500;
    line-height: 1.35;
}

.synth-catalyst-status-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.synth-catalyst-stock-pill {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.synth-catalyst-stock-pill.ready {
    background: #1b4d2e;
    color: #c7eed3;
    border: 1px solid #2f7a4d;
}

.synth-catalyst-stock-pill.missing {
    background: #8c2a1a;
    color: #fbd6d0;
    border: 1px solid #b83c27;
}