@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');

/* Main Button Styling */
.order-btn {
    position: relative;
    width: 100%; /* Make it full width of its container */
    height: 72px;
    background-color: #111827;
    color: white;
    font-family: 'Poppins', sans-serif;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Disabled State */
.order-btn:disabled {
    background-color: #9ca3af; /* Gray color */
    cursor: not-allowed;
    box-shadow: none;
}

/* Text Management */
.btn-text {
    position: absolute;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    font-weight: 600;
    pointer-events: none;
}

.text-default { 
    opacity: 1; 
    transform: scale(1); 
    z-index: 2;
}

.text-done { 
    opacity: 0; 
    transform: scale(0.8) translateY(20px); 
    color: #4ade80;
    z-index: 1;
}

.order-btn.animating .text-default,
.order-btn.sent .text-default { 
    opacity: 0; 
    transform: scale(0.5) translateY(-40px); 
}

.order-btn.sent .text-done { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
    z-index: 3;
}

/* Icon Container */
.food-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 4;
    visibility: hidden;
}

.order-btn.animating .food-stage { 
    opacity: 1; 
    visibility: visible;
}

/* Assembly Animation Styles */
.food-item-svg {
    width: 64px;
    height: 64px;
    overflow: visible;
}

@keyframes assemblePart {
    0% { transform: translateY(-60px) scaleY(1.5); opacity: 0; }
    60% { transform: translateY(5px) scaleY(0.8); opacity: 1; }
    100% { transform: translateY(0) scaleY(1); opacity: 1; }
}

@keyframes shipRight {
    0% { transform: translateX(0) rotate(0); opacity: 1; }
    20% { transform: translateX(-20px) rotate(-5deg); opacity: 1; }
    100% { transform: translateX(350px) rotate(15deg); opacity: 0; }
}

.order-btn.animating .food-item-svg > * {
    opacity: 0;
    animation: assemblePart 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.order-btn.delivering .food-stage {
    animation: shipRight 0.6s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}