/* Container for the entire list */
.list-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    background-color: #fff;
    color: #000;
    font-family: Arial, sans-serif;
}

h3 {
    font-family: montserrat;
}

/* Individual list item */
.list-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fdfdfd;
}

.list-item .title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.list-item .info {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
    max-width: 100%;
    word-wrap: break-word;
}

.list-item .price {
    font-size: 14px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 8px;
}

.list-item .controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.list-item .button {
    padding: 5px 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease; /* Smooth hover transition */
}

.list-item .button:hover {
    background-color: #0056b3;
}

.list-item .button .icon {
    margin-left: 5px;
}

.list-item .svg-button {
    padding: 5px;
    background-color: #007DFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: background-color 0.2s ease; /* Smooth hover transition */
}

.list-item .svg-button:hover {
    background-color: #007DFF;
}

/* Modal styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    font-family: Roboto, Helvetica, Arial, sans-serif;
}

.modal-content p,
.modal-content div {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 12px;
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.close-btn:hover {
    color: #007bff;
    transform: scale(1.2);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 16px;
        max-height: 85vh;
    }

    .modal-content h3 {
        font-size: 18px;
        font-family: Roboto, Helvetica, Arial, sans-serif;
    }

    .modal-content p,
    .modal-content div {
        font-size: 13px;
    }

    .close-btn {
        font-size: 24px;
    }
}

.modal-content:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.close-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.loading {
    text-align: center;
    font-weight: bold;
    padding: 20px;
    color: #333;
    font-size: 16px;
}

/* Optional: spinner animation */
.loading::after {
    content: "";
    display: block;
    margin: 10px auto 0;
    width: 30px;
    height: 30px;
    border: 4px solid #ccc;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.list-item .svg-button svg {
    width: 18px;
    height: 18px;
    display: block;        /* removes inline spacing */
    pointer-events: none;  /* ensures clicks go to the button, not SVG */
}

