/* بِسْمِ ٱللَّٰهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ */
* {
    font-family: 'Work Sans';
}

body {
    background-color: #fefdf8;
    margin-left: 15%;
    margin-right: 15%;
}
body > h1, body > h2 {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0px;
}

input, #customInputContainer, #selectedItemsDisplay,#selectedItemsTable {
    border: 3px solid black;
    border-radius: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1;
    border-right: 3px solid black;
    border-left: 3px solid black;
    border-bottom: 3px solid black;
}

.dropdown-content div {
    padding: 10px;
    background-color: #f9f9f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-bottom: 3px solid black;
}
.dropdown-content div:hover {
    background-color: #b8ff9f;

}
.dropdown-content div:last-child {
    border-bottom: none; /* Remove border for the last item */
}

#searchInput {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

/* Checkbox styling */
.dropdown-content input[type="checkbox"] {
    margin-right: 10px;
    box-shadow: none;
    accent-color: #ffc29f;
}
/* Selected items display */
#selectedItemsDisplay {
    margin-top: 10px;
    background-color: #fff3d9;
    padding: 10px 20px;
    box-shadow: 3px 3px;
}
#selectedItemsDisplay > h3 {
    margin-top: 0px;
    margin-bottom: 10px;
}

#selectedItemsDisplay > span {
display: block;
text-align: center;
margin-top: 10px;
margin-bottom: 10px;
}

#noItemsMessage {
    display: block; /* Show by default */
    font-style: italic;
    color: #666;
}

#selectedItemsTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    display: none; /* Hide by default */
    box-shadow: 3px 3px;
}

#selectedItemsTable th,
#selectedItemsTable td {
    padding: 8px;
    text-align: left;
    border: 3px solid #000;
}

#selectedItemsTable th {
    background-color: #e8f0fd;
    font-weight: bold;
}

#selectedItemsTable td {
    background-color: #f9f9f9;
}

/* Buttons */
#clearAllButton:disabled,
#convertButton:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

#clearAllButton,#addItemButton,#convertButton {
    padding: 5px 10px;
    border: 3px solid black;
    cursor: pointer;
    border-radius: 5px;
    color: black;
    width: auto;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 3px 3px;
    background-color: #ffc480;
}

#clearAllButton{
    background-color: #fe92e8;
}

#addItemButton:hover,#convertButton:hover {
    background-color: #ffe79e;
}

#clearAllButton:hover {
    background-color: #f2b1e5;
}

/* Custom input container */
#customInputContainer {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background-color: #fff3d9;
    box-shadow: 3px 3px;
}

#customInputContainer > p {
    margin: 0px;
    font-style: italic;
    color: #666;
}

#customAmountInput,
#customLabelInput {
    padding: 10px;
    border: 3px solid black;
    width: 100%;
    box-sizing: border-box;
}
svg {
    width: 20px;
    height: auto;
}

footer #buy-me-coffee{
    display: flex;
    align-items: center;
    margin-left:auto;
    margin-right:auto;
    width: fit-content;
    border-radius: 10px;
    box-sizing: border-box;
    padding: 0.5% 1%;
    box-shadow: 3px 3px;
    border: 2px solid black;
    text-decoration: none;
}
footer a{
    color: black;  
}
footer a:visited{
    color: black;  
}

footer a:hover {
    transform: scale(1.05);
}
.social-icon{
    width: 2vw;
    padding-right: 1vw;
}
footer {
text-align: center;
}

/* Trash button styling */
.remove-item-btn {
    background-color: #ff6b6b;
    color: white;
    border: 2px solid black;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 2px 2px;
    margin-right: 10px;
    vertical-align: middle;
    padding: 0;
    line-height: 1; /* Fix icon alignment */
}

.remove-item-btn:hover {
    background-color: #ff5252;
    transform: scale(1.1);
}

/* Animation for rows */
.item-row {
    transition: opacity 0.3s ease; /* Smooth fade-out */
}

/* Adjust table cell padding */
#selectedItemsTable td {
    padding-left: 10px;
}

@media (max-width: 768px) {
    body {
        margin-left: 5%;
        margin-right: 5%;
    }
    #selectedItemsTable td {
        font-size: 0.8em;
    }
}