/* Popup Container */
.aiows-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aiows-popup-container.is-visible {
    display: flex;
    opacity: 1;
}

/* Overlay */
.aiows-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

/* Wrapper - Position Control */
.aiows-popup-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    padding: 20px;
    box-sizing: border-box;
    pointer-events: none;
    overflow-y: auto;
}

.aiows-popup-wrapper * {
    pointer-events: auto;
}

/* Position Classes */
.aiows-popup-position-center {
    align-items: center;
    justify-content: center;
}

.aiows-popup-position-top {
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
}

.aiows-popup-position-bottom {
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 40px;
}

.aiows-popup-position-top-left {
    align-items: flex-start;
    justify-content: flex-start;
}

.aiows-popup-position-top-right {
    align-items: flex-start;
    justify-content: flex-end;
}

.aiows-popup-position-bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
}

.aiows-popup-position-bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
}

/* Popup Content */
.aiows-popup-content {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Close Button */
.aiows-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

.aiows-popup-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Inner Content */
.aiows-popup-inner {
    padding: 40px 30px;
    overflow-y: auto;
    flex: 1;
}

/* Animation Classes */
.aiows-popup-animation-fade .aiows-popup-content {
    animation: aiowsFadeIn 0.3s ease;
}

@keyframes aiowsFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.aiows-popup-animation-slide-up .aiows-popup-content {
    animation: aiowsSlideUp 0.4s ease;
}

@keyframes aiowsSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aiows-popup-animation-slide-down .aiows-popup-content {
    animation: aiowsSlideDown 0.4s ease;
}

@keyframes aiowsSlideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aiows-popup-animation-zoom .aiows-popup-content {
    animation: aiowsZoom 0.3s ease;
}

@keyframes aiowsZoom {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Closing Animations */
.aiows-popup-container.is-closing {
    opacity: 0;
}

.aiows-popup-container.is-closing .aiows-popup-content {
    animation: aiowsFadeOut 0.2s ease;
}

@keyframes aiowsFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .aiows-popup-wrapper {
        padding: 10px;
    }
    
    .aiows-popup-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .aiows-popup-inner {
        padding: 30px 20px;
    }
    
    .aiows-popup-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

/* Content Styling */
.aiows-popup-inner h1,
.aiows-popup-inner h2,
.aiows-popup-inner h3,
.aiows-popup-inner h4,
.aiows-popup-inner h5,
.aiows-popup-inner h6 {
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}

.aiows-popup-inner p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.aiows-popup-inner img {
    max-width: 100%;
    height: auto;
}

.aiows-popup-inner a {
    color: #2271b1;
    text-decoration: none;
}

.aiows-popup-inner a:hover {
    text-decoration: underline;
}

/* Form Elements in Popup */
.aiows-popup-inner input[type="text"],
.aiows-popup-inner input[type="email"],
.aiows-popup-inner input[type="tel"],
.aiows-popup-inner textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.aiows-popup-inner input[type="submit"],
.aiows-popup-inner button[type="submit"] {
    background: #2271b1;
    color: #ffffff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.aiows-popup-inner input[type="submit"]:hover,
.aiows-popup-inner button[type="submit"]:hover {
    background: #135e96;
}
