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

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    font-size: 13px;
    background-color: var(--boga-kalar);
    color: var(--kola-kalar);
}

#grid-container,
#list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    justify-content: flex-start;
}

.series-card {
    flex: 0 0 260px;
    background-color: white;
    border: 1px solid var(--border-kalar);
    border-radius: 6px;
    padding: 1rem;
    height: fit-content;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}


.series-card h2 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.series-card h2 i {
    margin-left: 0.4rem;
    color: var(--strikethrough-kalar);
    transition: color 0.2s ease-in-out;
}

.series-card h2 i:hover {
    color: var(--raja-kalar);
}

.series-card ol {
    margin: 0;
    padding-left: 1.2rem;
}

.series-card li {
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.series-card li.strikethrough {
    text-decoration: line-through;
    color: var(--strikethrough-kalar);
}

.grid-card {
    background-color: white;
    border: 1px solid var(--border-kalar);
    border-radius: 6px;
    padding: 1rem;
    height: fit-content;
    width: fit-content;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
    gap: 4px;
    max-width: calc(36px * 10 + 9 * 4px);
    margin: 0 auto;
}


.grid-cell {
    padding: 0.4rem;
    text-align: center;
    border: 1px solid var(--border-kalar);
    background-color: white;
    border-radius: 4px;
    font-weight: 500;
}

.grid-cell.received {
    background-color: var(--received-kalar);
    color: black;
}

.grid-cell.uncountable {
    opacity: 0.5;
}

.grid-cell.arranged {
    background-color: var(--arranged-kalar);
    color: black;
}

.grid-cell:hover {
    border-color: var(--raja-kalar);
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 1);
    flex-direction: column;
}

.image-modal-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 20px 80px;
    margin: auto;
}

@media (min-width: 600px) {
    .image-modal-content {
        grid-template-columns: repeat(10, 1fr);
    }
}

.image-modal-content .image-item {
    position: relative;
}

.image-modal-content .image-item img {
    width: 100%;
    height: auto;
    filter: grayscale(0%);
    transition: 0.3s ease;
    max-width: 100%;
    object-fit: contain;
}

.image-modal-content .image-item.greyed img {
    filter: grayscale(100%);
    opacity: 0.4;
}

.image-modal-content .image-item .tag {
    position: absolute;
    top: 4px;
    left: 4px;
    background: black;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 2500;
}

.image-modal-content .image-item .name {
    background: black;
    padding: 0px 2px;
    font-size: 10px;
    color: white;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3000;
}

.image-modal h2 {
    margin: .4rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: white;
}

.image-modal .subtitle {
    margin: 0 0 0.5rem;
    color: grey;
    text-align: center;
}

.counter {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: grey;
    font-weight: 500;
    text-align: right;
}

#legend-container {
    position: fixed;
    top: 5rem;
    right: 0;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
}

#legend-wrapper {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

#legend-tab {
    background-color: var(--raja-kalar);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    font-weight: bold;
    height: 28px;
}

#legend-box {
    background-color: white;
    border-radius: 0 0 0 6px;
    padding: 0.8rem 1rem;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

.legend-item {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
    border: 1px solid var(--border-kalar);
    vertical-align: middle;
}

.status-dot {
    margin-right: 0;
    margin-left: 6px;
}

.green {
    background-color: var(--received-kalar);
}

.red {
    background-color: var(--arranged-kalar);
}

#legend-box .strikethrough {
    text-decoration: line-through;
    color: var(--strikethrough-kalar);
    padding-right: 8px;
}

@media (max-width: 600px) {
    .series-card {
        flex: 0 0 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    #legend-container {
        top: auto;
        bottom: 5rem;
    }
}

.single-image-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 1);
    justify-content: center;
    align-items: center;
}

.single-image-modal .modal-content {
    position: relative;
    padding: 1rem;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.single-image-modal img {
    max-width: 100%;
    max-height: 70vh;
    margin-bottom: 0.5rem;
}

.single-image-modal .name {
    font-size: 0.9rem;
    color: white;
    text-align: center;
}

#countrySearch::-webkit-input-placeholder {
    font-family: 'Poppins', sans-serif;
    font-size: small;
}

#countrySearch:-ms-input-placeholder {
    font-family: 'Poppins', sans-serif;
    font-size: small;
}

#countrySearch::-ms-input-placeholder {
    font-family: 'Poppins', sans-serif;
    font-size: small;
}

.country-tracker-container {
    background-color: white;
    border: 1px solid var(--dhek-kalar);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.country-tracker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.country-tracker-container>div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 1rem;
}

.country-tracker-container h2 {
    margin: 0;
    font-size: 1.5rem;
}

.tracker-search-container {
    position: relative;
    max-width: 300px;
    width: 100%;
}

#countrySearch {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-kalar);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tracker-search-container::before {
    content: "\f002";
    /* Font Awesome search icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--strikethrough-kalar);
    pointer-events: none;
}

.country-entry {
    position: relative;
    background-color: var(--boga-kalar);
    border-left: 2px solid var(--raja-kalar);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
}

.country-flag {
    position: absolute;
    right: 8px;
    bottom: 8px;
    opacity: 0.4;
    border-radius: 50%;
    height: 24px;
    width: 24px;
    object-fit: cover;
}

.country-entry strong {
    color: var(--kola-kalar);
    font-weight: 600;
}

@media (max-width: 600px) {
    .country-tracker-container>div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tracker-search-container {
        width: 100%;
    }

    #countrySearch {
        width: 100%;
    }
}

#bookmarks a {
    text-decoration: none;
    color: var(--kola-kalar);
}

.checkbox-div {
    display: flex;
    align-items: center;
}