/* 
 * Elementor Positions Widget Styles
 */

/* Grid Layout */
.epw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* Card Styling */
.epw-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.epw-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.epw-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.epw-card-header {
    margin-bottom: 5px;
}

.epw-card-title {
    color: #4CAF50;
    /* Green primary color typically used in the screenshot */
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.epw-card-title span {
    font-size: 1.1rem;
    font-weight: 600;
}

.epw-card-meta {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 15px 0;
}

.epw-card-pay {
    font-size: 1rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.epw-check-icon {
    color: #4CAF50;
    margin-right: 8px;
    font-weight: bold;
}

.epw-card-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    flex-grow: 1;
    /* Pushes button to bottom */
    margin-bottom: 25px;
}

/* Card Actions */
.epw-card-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
    flex-wrap: wrap;
}

/* Button */
.epw-btn {
    background-color: #6EAB3D;
    /* Muted Green */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.epw-btn:hover {
    background-color: #588C2F;
}

.epw-btn-apply {
    background-color: #2c3e50;
}

.epw-btn-apply:hover {
    background-color: #1a252f;
}

/* Popup Overlay */
.epw-popup-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.epw-popup-overlay.epw-active {
    display: flex;
}

/* Popup Content Box */
.epw-popup-content {
    background: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: epwFadeIn 0.3s ease forwards;
}

.epw-apply-popup-content {
    max-width: 600px;
}

@keyframes epwFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Popup Close Button */
.epw-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.epw-popup-close:hover {
    color: #333;
}

/* Popup Inner Elements */
.epw-popup-title {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.epw-popup-body h3 {
    color: #4CAF50;
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 10px;
}

.epw-popup-body h3:first-child {
    margin-top: 0;
}

.epw-popup-text {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
}

/* Responsive adjust */
@media (max-width: 768px) {
    .epw-grid {
        grid-template-columns: 1fr;
    }

    .epw-popup-content {
        padding: 25px;
    }
}