/* Popup styles */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.popup.show {
    opacity: 1;
}

.popup-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--input-bg);
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .popup-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 400px;
        height: 90vh;
        max-height: 600px;
        border-radius: 20px;
    }
}

.popup-header {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--input-border);
}

.popup-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.popup-footer {
    padding: 15px;
    border-top: 1px solid var(--input-border);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    background-color: var(--input-bg);
}

.popup-btn {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    background: none;
    border: none;
    margin: 0;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.popup-btn:hover {
    background-color: var(--toggle-bg);
}

.popup-btn:active {
    transform: translateY(1px);
}

.popup-btn:first-child {
    border-right: 1px solid var(--input-border);
}

#applyCrop {
    color: #012c6d;
    font-weight: 500;
}

#applyCrop:hover {
    background-color: #012c6d;
    color: white;
}

.filter-section {
    background: var(--input-bg);
    padding: 15px;
    border-top: 1px solid var(--input-border);
    overflow-y: auto;
}

.filter-label {
    font-size: 0.9rem;
    color: #012c6d;
    margin-bottom: 10px;
    text-align: center;
}

.filter-scroll-container {
    overflow-x: auto;
    padding: 5px 0;
    margin: 0 -15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
    scroll-behavior: smooth;
}

.filter-scroll-container::-webkit-scrollbar {
    display: none;
}

.filter-buttons {
    display: inline-flex;
    padding: 0 15px;
    gap: 15px;
}

.filter-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    width: 60px;
}

.filter-btn:hover {
    background: rgba(0,0,0,0) ;
}

.filter-preview-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 5px;
    background-size: cover;
    background-position: center;
}

.filter-btn.active .filter-preview-small {
    border: 2px solid #012c6d;
    box-shadow: 0 0 0 2px rgba(255,45,85,0.2);
}

.filter-btn span {
    font-size: 0.8rem;
    color: var(--text-color);
    display: block;
    text-align: center;
    margin-top: 4px;
}

/* Responsive styles for popup */
@media (max-width: 768px) {
    .popup-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    #cropperContainer {
        height: 50vh;
    }

    .filter-section {
        padding: 15px 0;
    }

    .filter-scroll-container {
        overflow-x: auto;
        white-space: nowrap;
        padding: 0 15px;
    }

    .filter-buttons {
        display: flex;
        gap: 10px;
    }

    .filter-btn {
        width: 60px;
        flex-shrink: 0;
    }

    .filter-preview-small {
        width: 60px;
        height: 60px;
    }

    .popup-btn {
        padding: 15px;
    }
}

