/* CSS untuk versi sederhana */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    animation: fadeIn 0.2s ease;
}

    .image-overlay img {
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
        cursor: pointer;
        border-radius: 4px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .image-overlay img {
        max-width: 95%;
        max-height: 95%;
    }
}


/* Floating Container */
.floating-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    pointer-events: none;
    padding: 15px;
    background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.7) 70%, transparent 100%);
}

/* Tombol dengan lebar penuh */
.floating-button {
    background-color: #FF6600;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 25px;
    font-size: x-large;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    pointer-events: auto;
    text-align: center;
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Bagian kiri (Total) */
.button-left {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 15px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

.total-label {
    font-size: 14px;
    font-weight: normal;
    opacity: 0.9;
    margin-bottom: 4px;
    display: block;
}

.total-amount {
    font-size: 22px;
    font-weight: bold;
    color: white;
    display: block;
}

/* Bagian kanan (Teks tombol) */
.button-right {
    flex: 1;
    text-align: right;
    padding-left: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.button-text {
    font-size: x-large;
    font-weight: bold;
    color: white;
}

/* Icon panah (opsional) */
.button-icon {
    margin-left: 10px;
    font-size: 20px;
    transition: transform 0.3s ease;
}

/* Hover effects */
.floating-button:hover {
    background-color: #E55A00;
    box-shadow: 0 -2px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

    .floating-button:hover .button-icon {
        transform: translateX(5px);
    }

.floating-button:active {
    transform: translateY(1px);
}

.floating-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

    .floating-button:disabled .total-amount {
        color: #888;
    }

/* Animasi muncul */
@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.floating-container {
    animation: slideUp 0.4s ease-out;
}

/* Responsive Design */
@media (max-width: 992px) {
    .floating-button {
        max-width: 95%;
        padding: 16px 20px;
    }

    .total-label {
        font-size: 13px;
    }

    .total-amount {
        font-size: 20px;
    }

    .button-text {
        font-size: large;
    }
}

@media (max-width: 768px) {
    .floating-container {
        padding: 12px 15px;
    }

    .floating-button {
        padding: 14px 18px;
        border-radius: 40px;
    }

    .total-label {
        font-size: 12px;
    }

    .total-amount {
        font-size: 18px;
    }

    .button-text {
        font-size: medium;
    }

    .button-icon {
        font-size: 18px;
        margin-left: 8px;
    }
}

@media (max-width: 576px) {
    .floating-container {
        padding: 10px 12px;
    }

    .floating-button {
        padding: 12px 15px;
        border-radius: 35px;
        flex-direction: column;
        align-items: stretch;
    }

    .button-left,
    .button-right {
        border: none;
        padding: 0;
        text-align: center;
        width: 100%;
    }

    .button-left {
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .total-label {
        font-size: 11px;
        text-align: center;
    }

    .total-amount {
        font-size: 16px;
        text-align: center;
    }

    .button-text {
        font-size: 16px;
    }

    .button-icon {
        display: none; /* Sembunyikan icon di mobile kecil */
    }
}

/* Untuk layar sangat kecil */
@media (max-width: 360px) {
    .floating-button {
        padding: 10px 12px;
    }

    .total-label {
        font-size: 10px;
    }

    .total-amount {
        font-size: 14px;
    }

    .button-text {
        font-size: 14px;
    }
}

/* Modifikasi untuk teks tombol di tengah */
.floating-button.centered-text .button-right {
    flex: 2; /* Memberikan lebih banyak ruang untuk bagian tengah */
    text-align: center;
    justify-content: center;
}

/* Atau alternatif - hapus struktur kiri/kanan dan buat satu elemen tengah */
.floating-button.simple-center {
    justify-content: center;
}

    .floating-button.simple-center .button-left,
    .floating-button.simple-center .button-right {
        display: none;
    }

.center-content {
    text-align: center;
    flex-grow: 1;
}