
/* KALKULATOR PARLAY STYLES - FINAL ANTI-OVERLAP */
#sectionParlayCalc {
    padding: 12px 24px 24px;
}

.calc-grid-parlay {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    margin-top: 14px;
    align-items: start;
}

.parlay-main {
    min-width: 0; /* Prevents grid blowout */
    height: auto !important;
    min-height: 0 !important;
    align-self: start;
    padding-bottom: 18px !important;
}

.parlay-result-panel {
    height: auto !important;
    min-height: 0 !important;
    align-self: start;
}

.parlay-legs-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
    overflow-x: auto;
}

.parlay-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

/* Header & Row — match lebar, odds jelas */
.parlay-legs-header, .parlay-leg-row {
    display: grid;
    grid-template-columns: 44px minmax(220px, 2.4fr) minmax(100px, 120px) minmax(240px, 1.2fr) 44px;
    align-items: center;
    gap: 12px;
    min-width: 720px;
}

.parlay-legs-header {
    padding: 0 20px 12px 20px;
    border-bottom: 1px solid rgba(0, 255, 242, 0.1);
}

.parlay-header-label {
    font-size: 10px;
    font-weight: 800;
    color: #d4ecff;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 1;
    white-space: nowrap;
    overflow: visible;
}

.parlay-leg-row {
    padding: 14px 18px;
    background: rgba(10, 25, 35, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 242, 0.1);
    border-radius: 10px;
    transition: all 0.3s;
}

.parlay-leg-row:hover {
    border-color: var(--primary);
    background: rgba(15, 35, 50, 0.8);
    transform: translateY(-2px);
}

.parlay-leg-row .parlay-match-input {
    min-width: 220px;
}

.parlay-leg-row .parlay-odds-input {
    min-width: 100px;
    max-width: 120px;
}

.parlay-leg-row .parlay-odds-input .wd-input {
    text-align: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

/* Inputs - Strictly sized */
.parlay-leg-row .wd-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    padding: 11px 14px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap;
}

.parlay-leg-row .wd-input.mini {
    min-height: 42px !important;
    height: 42px !important;
}

/* Match / Selection — area teks lebih luas */
.parlay-leg-row .cyber-input-wrapper:nth-of-type(1) .wd-input,
.parlay-leg-row > .cyber-input-wrapper:first-of-type .wd-input {
    padding-left: 14px !important;
    padding-right: 14px !important;
}

/* Odds input — angka tidak terpotong */
.parlay-leg-row input[type="number"],
.parlay-leg-row .wd-input.highlight-green {
    color: #7dffc4 !important;
    -webkit-text-fill-color: #7dffc4 !important;
    font-weight: 800 !important;
    font-family: Arial, sans-serif !important;
    font-size: 15px !important;
    text-align: center !important;
    padding: 11px 10px !important;
    min-width: 100px !important;
    letter-spacing: 0.5px;
    /* Hilangkan spiner yang memakan ruang di kanan */
    -moz-appearance: textfield;
}

.parlay-leg-row input[type="number"]::-webkit-outer-spin-button,
.parlay-leg-row input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Status Group - Wide enough to never overlap */
.leg-status-group {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    background: rgba(0, 0, 0, 0.4);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.btn-status {
    padding: 10px 2px;
    font-size: 9px;
    font-weight: 800;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
}

.btn-status.active { color: #000; font-weight: 900; }
.btn-status.win.active { background: #00ff88; box-shadow: 0 0 15px rgba(0, 255, 136, 0.5); }
.btn-status.win-half.active { background: #00ccff; box-shadow: 0 0 15px rgba(0, 204, 255, 0.5); }
.btn-status.draw.active { background: #e0e6ed; }
.btn-status.lose-half.active { background: #ff9900; box-shadow: 0 0 15px rgba(255, 153, 0, 0.5); }
.btn-status.lose.active { background: #ff3e3e; box-shadow: 0 0 15px rgba(255, 62, 62, 0.5); }

/* Results */
.parlay-result-box {
    margin-top: 25px;
    padding: 25px;
    background: rgba(0, 255, 242, 0.02);
    border: 1px solid rgba(0, 255, 242, 0.2);
    border-radius: 12px;
}

.parlay-res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.parlay-res-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.5px;
}

.parlay-res-val {
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 800;
}

.parlay-res-val.success { color: #00ff88; }
.parlay-res-val.error { color: #ff3e3e; }
.parlay-res-val.highlight-cyan { color: #00d4ff; }
.parlay-res-val.highlight-gold { color: #ffd700; text-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }

.premium-gold-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(0, 0, 0, 0.4) 100%) !important;
    border: 1px solid var(--gold-primary) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(212, 175, 55, 0.05);
}

.parlay-res-item.main-res {
    margin-bottom: 20px;
}

.parlay-res-item.main-res .parlay-res-label {
    font-size: 10px;
    font-weight: 900;
    color: var(--gold-primary);
    text-transform: uppercase;
}

.parlay-res-item.main-res .parlay-res-val {
    font-size: 32px;
}

.btn-remove-leg {
    background: rgba(255, 62, 62, 0.1);
    border: 1px solid rgba(255, 62, 62, 0.2);
    color: #ff3e3e;
    width: 32px; height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-leg:hover {
    background: #ff3e3e; color: #fff;
}

@media (max-width: 1400px) {
    .parlay-legs-header, .parlay-leg-row {
        grid-template-columns: 40px minmax(200px, 2.2fr) minmax(96px, 110px) minmax(220px, 1fr) 40px;
        gap: 10px;
        padding: 12px 14px;
        min-width: 680px;
    }
}

@media (max-width: 1200px) {
    .calc-grid-parlay {
        grid-template-columns: 1fr;
    }
    .parlay-legs-header { display: none; }
    .parlay-leg-row {
        grid-template-columns: 40px 1fr 110px 40px;
        grid-template-areas: 
            "num name name del"
            "none odds status status";
        min-width: 0;
    }
    .parlay-leg-row .leg-number { grid-area: num; }
    .parlay-leg-row .parlay-match-input { grid-area: name; }
    .parlay-leg-row .parlay-odds-input { grid-area: odds; }
    .parlay-leg-row .leg-status-group { grid-area: status; }
    .parlay-leg-row .btn-remove-leg { grid-area: del; }
}

/* FOOTER INFO STYLES */
.parlay-footer-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.parlay-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.info-title {
    font-size: 10px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 10px;
    letter-spacing: 1.5px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 5px;
    line-height: 1.4;
}

.info-list li span {
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
    margin-right: 5px;
}

.formula-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #ffd700;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 10px;
}

.info-list.small li {
    font-size: 9px;
    font-style: italic;
}
