/* CSS for KM Homepage Popup */

.km-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 20px;
    box-sizing: border-box;
}

.km-popup-overlay.km-popup-active {
    opacity: 1;
    visibility: visible;
}

.km-popup-container {
    background-color: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
}

.km-popup-overlay.km-popup-active .km-popup-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Close icon */
.km-popup-close-icon {
    position: absolute;
    margin: 0;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #334155;
    z-index: 10;
    transition: background-color 0.2s, transform 0.2s;
    padding: 0;
}

.km-popup-close-icon:hover {
    background: #f1f5f9;
    transform: rotate(90deg);
}

.km-popup-image {
    width: 100%;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.km-popup-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 250px;
}

.km-popup-body {
    padding: 15px 30px;
    text-align: center;
}

.km-popup-title {
    font-size: 24px;
    color: #1e2f6f;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}

.km-popup-content {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 25px;
}

.km-popup-content p {
    margin-bottom: 10px;
}

.km-popup-content p:last-child {
    margin-bottom: 0;
}

.km-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    /* in case of small screen */
}

.km-popup-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-family: inherit;
    flex: 1;
    min-width: 120px;
}

.km-popup-btn-primary {
    background-color: #2e438f;
    color: #ffffff;
}

.km-popup-btn-primary:hover {
    background-color: #223771;
    box-shadow: 0 4px 12px rgba(46, 67, 143, 0.3);
}

/* Text Button Footer */
.km-popup-footer-action {
    display: flex;
    justify-content: center;
}

.km-popup-btn-text {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s;
    margin: 0;
}

.km-popup-btn-text:hover {
    color: #475569;
}

/* Scrollbar for container */
.km-popup-container::-webkit-scrollbar {
    width: 6px;
}

.km-popup-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 12px 12px 0;
}

.km-popup-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

@media (max-width: 480px) {
    .km-popup-body {
        padding: 24px 20px;
    }

    .km-popup-title {
        font-size: 20px;
    }

    .km-popup-actions {
        flex-direction: column;
    }

    .km-popup-btn {
        width: 100%;
    }
}