/* Layout */
body {
    font-family: sans-serif;
    max-width: 400px;
    margin: auto;
    padding: 1rem;
    box-sizing: border-box;
}

/* Input styling */
input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    font-size: 16px; 
    box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

input[type="text"], input[type="number"], textarea, select {
  font-size: 16px !important;
  touch-action: manipulation;
}

input[type="number"], select, textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}


/* Topping grid */
.toppings {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

/* Individual topping button */
.topping {
    position: relative;
    flex: 1 1 45%;
    background: #eee;
    padding: 1rem;
    border-radius: 1rem;
    text-align: center;
    font-size: 1.2rem;
    cursor: pointer;
    user-select: none;
    border: 2px solid transparent;
    transition: background 0.3s, border 0.3s;
    box-sizing: border-box;
}

/* Selected visual style */
.topping.selected {
    background: #dfffe0;
    border: 2px solid #4CAF50;
}

/* Checkmark icon */
.topping.selected::before {
    content: '✔';
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 1.2rem;
    color: #4CAF50;
    font-weight: bold;
}

/* Action buttons */
button {
    padding: 0.7rem;
    margin: 0.3rem;
    width: 48%;
    font-weight: bold;
    font-size: 16px;
    box-sizing: border-box;
}

/* Output box */
#output {
    white-space: pre-wrap;
    margin-top: 2rem;
    background: #f0f0f0;
    padding: 1rem;
    border-radius: 8px;
    box-sizing: border-box;
}

#outputActions {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
}

#outputActions button {
    width: auto;
}

#ordersListContainer {
    margin-top: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.5rem;
}

.order-item .order-text {
    flex: 1;
    font-size: 0.95rem;
}

.order-item .order-actions {
    display: flex;
    gap: 0.4rem;
}

.order-item .order-actions button {
    width: auto;
    padding: 0.4rem 0.6rem;
    margin: 0;
    font-size: 0.85rem;
}

/* Language select dropdown */
.language-select {
    padding: 0.4rem 1rem;
    border-radius: 12px;
    border: 2px solid #4CAF50;
    background-color: #ffffff;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    outline: none;
    box-sizing: border-box;
}

.language-select:hover,
.language-select:focus {
    background-color: #f0f0f0;
    border-color: #388e3c;
}

/* Responsive adjustments for small screens */
@media (max-width: 420px) {
    body {
        max-width: 100%;
        padding: 0.5rem;
    }

    .topping {
        flex: 1 1 100%;
    }

    button {
        width: 100%;
        margin: 0.25rem 0;
    }

    div[style*="justify-content: space-between"] {
        flex-direction: column;
        gap: 0.5rem;
    }
}
