/* Import Font (Opsional, tapi bikin mirip) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Reset & Basic Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #E6F0FF; /* Latar belakang biru muda */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow: hidden; /* Sembunyikan overflow dari lingkaran */
    position: relative;
}

/* Lingkaran background dari gambar */
body::before {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -100px;
    width: 350px;
    height: 350px;
    background: #FFB800; /* Oranye */
    border-radius: 50%;
    z-index: -1;
    opacity: 0.8;
}

body::after {
    content: '';
    position: absolute;
    top: -50px;
    right: 20%;
    width: 150px;
    height: 150px;
    background: #0052CC; /* Biru */
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
}

/* Kontainer Utama (Kotak Putih Bulat) */
.payment-app {
    width: 100%;
    max-width: 900px; /* Lebar maksimal */
    min-height: 600px;
    background-color: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 82, 204, 0.15);
    display: flex;
    overflow: hidden; /* Biar sidebar kanannya rapi */
}

/* Kolom Konten Kiri */
.content-area {
    flex: 2; /* Ambil 2 bagian (lebih besar) */
    padding: 40px;
    position: relative; /* Untuk layar result */
}

.content-area h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #172B4D;
    margin-bottom: 8px;
}

.content-area p {
    font-size: 1rem;
    color: #5E6C84;
    margin-bottom: 32px;
}

/* Kolom Sidebar Kanan (Biru Tua) */
.details-sidebar {
    flex: 1; /* Ambil 1 bagian (lebih kecil) */
    background: #0041A3; /* Biru tua dari gambar */
    padding: 40px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Logo Teks di Kanan Atas */
.logo-text {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.logo-text span {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.8;
    display: block;
}

/* Info Jam & Tanggal */
.live-info {
    text-align: left;
}

.info-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.live-clock {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.live-date {
    font-size: 1rem;
    opacity: 0.9;
}

/* Pilihan Mata Uang */
.currency-selector {
    display: flex;
    margin-bottom: 24px;
    gap: 10px;
}

.currency-selector input[type="radio"] {
    display: none; /* Sembunyikan radio button asli */
}

.currency-selector label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 2px solid #DFE1E6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #42526E;
}

.currency-selector label img {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #ccc;
}

/* Efek saat dipilih */
.currency-selector input[type="radio"]:checked + label {
    background-color: #E6F0FF;
    border-color: #0052CC;
    color: #0052CC;
}

/* Form Input */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #42526E;
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #DFE1E6;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #0052CC;
}

.input-wrapper span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #42526E;
    padding: 0 16px;
}

.input-wrapper input {
    flex: 1;
    width: 100%;
    padding: 16px 16px 16px 0; /* Ubah padding */
    border: none;
    outline: none;
    font-size: 2rem;
    font-weight: 700;
    color: #172B4D;
    /* Hilangkan panah di input number */
    -moz-appearance: textfield;
}

.input-wrapper input::-webkit-outer-spin-button,
.input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#input-helper {
    color: #5E6C84;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Rincian Biaya */
.cost-summary {
    background: #FAFBFC;
    border: 1px solid #DFE1E6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #42526E;
}
.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row span:last-child {
    font-weight: 600;
    color: #172B4D;
}

.cost-summary hr {
    border: none;
    border-top: 1px dashed #C1C7D0;
    margin: 12px 0;
}

.summary-row.total span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #172B4D;
}

/* Tombol */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #0052CC;
    color: white;
}
.btn-primary:hover:not(:disabled) {
    background-color: #0041A3;
}
.btn-primary:disabled {
    background-color: #A5ADBA;
    cursor: not-allowed;
}

/* Layar Hasil (Overlay) */
.hidden {
    display: none !important;
}

#screen-result {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#result-content {
    line-height: 1.6;
    margin-bottom: 24px;
}

#result-content h2 {
    font-size: 1.75rem;
    color: #006644; /* Sukses */
    margin-bottom: 12px;
}
#result-content h2.error {
    color: #DE350B; /* Error */
}
#result-content p {
    color: #42526E;
    font-size: 1rem;
}
#result-content p strong {
    color: #172B4D;
}

/* Responsif untuk HP */
@media (max-width: 800px) {
    .payment-app {
        flex-direction: column;
        min-height: 0;
    }
    .details-sidebar {
        flex: unset;
        min-height: 250px; /* Tinggi minimal sidebar */
        order: -1; /* Pindahkan ke atas */
        justify-content: space-between;
    }
    .live-info {
        text-align: right; /* Pindah ke kanan */
    }
    .content-area {
        padding: 24px;
    }
    .content-area h1 {
        font-size: 1.75rem;
    }
    .input-wrapper input {
        font-size: 1.5rem;
    }
}
