/**
 * Service Modal Styles
 *
 * Styles for service modal popup.
 *
 * @package Nila
 * @author Amir Sheikhzadeh
 * @designer Morteza Haghani
 * @since 1.0.0
 */

/* Modal Wrapper */
.nila-service-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nila-service-modal-wrapper.active {
    display: block;
    opacity: 1;
}

/* Overlay */
.nila-service-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}

/* Modal Container */
.nila-service-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    z-index: 1;
}

/* Modal Content Wrapper */
.nila-service-modal-content-wrapper {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Close Button */
.nila-service-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    color: #333;
}

.nila-service-modal-close:hover {
    background: #fff;
    transform: rotate(90deg);
}

/* Modal Body */
.nila-service-modal-body {
    padding: 40px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Loading State */
.nila-service-modal-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 24px;
    color: #0073aa;
}

.nila-service-modal-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error State */
.nila-service-modal-error {
    text-align: center;
    padding: 40px 20px;
    color: #d63638;
}

/* Default Template Styles */
.nila-service-modal .nila-service-modal-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.nila-service-modal .nila-service-modal-icon,
.nila-service-modal .nila-service-modal-icon-image {
    margin-bottom: 20px;
}

.nila-service-modal .nila-service-modal-icon i {
    font-size: 64px;
    color: #0073aa;
}

.nila-service-modal .nila-service-modal-icon-image img {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
}

.nila-service-modal .nila-service-modal-title {
    font-size: 32px;
    margin: 0 0 15px 0;
    color: #333;
}

.nila-service-modal .nila-service-modal-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.nila-service-modal .nila-service-modal-price {
    font-size: 24px;
    font-weight: 600;
    color: #0073aa;
}

.nila-service-modal .nila-service-modal-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 16px;
}

.nila-service-modal .nila-service-modal-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.nila-service-modal .nila-service-modal-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.nila-service-modal .nila-service-modal-description {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #555;
}

.nila-service-modal .nila-service-modal-features {
    margin-bottom: 30px;
}

.nila-service-modal .nila-service-modal-features h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.nila-service-modal .nila-service-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nila-service-modal .nila-service-features-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nila-service-modal .nila-service-features-list li:last-child {
    border-bottom: none;
}

.nila-service-modal .nila-service-features-list li i {
    color: #28a745;
    font-size: 18px;
}

.nila-service-modal .nila-service-modal-button {
    text-align: center;
    margin-top: 30px;
}

.nila-service-modal .nila-service-cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nila-service-modal .nila-service-cta-button:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 115, 170, 0.3);
}

/* Elementor Template Styles */
.nila-service-modal-elementor-template {
    width: 100%;
}

/* Body Lock when modal is open */
body.nila-modal-open {
    overflow: hidden;
}

/* RTL Support */
body.rtl .nila-service-modal-close {
    right: auto;
    left: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .nila-service-modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .nila-service-modal-body {
        padding: 30px 20px;
        max-height: calc(95vh - 60px);
    }
    
    .nila-service-modal .nila-service-modal-title {
        font-size: 24px;
    }
    
    .nila-service-modal .nila-service-modal-meta {
        flex-direction: column;
        gap: 10px;
    }
}

