/* 
 * Appinity - Modal Styles
 * For service information dialogs and popups
 */

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.4s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary);
}

.modal-header {
    padding: 30px 30px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: var(--light-bg);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.8rem;
}

.modal-body {
    padding: 30px;
}

.modal-body > p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.modal-section {
    margin-bottom: 40px;
}

.modal-section h4 {
    position: relative;
    margin-bottom: 20px;
    font-size: 1.4rem;
    padding-bottom: 10px;
}

.modal-section h4:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.modal-list {
    list-style: none;
    margin-left: 5px;
}

.modal-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.modal-list li:before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--primary);
    font-size: 0.9rem;
}

.modal-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.modal-tech {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}

.modal-tech:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
    background: linear-gradient(145deg, #ffffff, #f7f9fc);
}

.tech-name {
    font-weight: 600;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.modal-tech p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-steps {
    counter-reset: step;
}

.modal-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-left: 10px;
}

.step-number {
    width: 35px;
    height: 35px;
    min-width: 35px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    font-size: 0.9rem;
}

.step-content h5 {
    margin: 0 0 5px;
    font-size: 1.1rem;
}

.step-content p {
    margin: 0;
    color: var(--text-light);
}

.modal-cta {
    text-align: center;
    margin-top: 30px;
}

.modal-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* iOS Modal Specific Styles */
#iosModal .modal-icon {
    color: #007aff;
    background: rgba(0, 122, 255, 0.1);
}

#iosModal .modal-section h4:after {
    background: linear-gradient(45deg, #007aff, #5ac8fa);
}

#iosModal .tech-name {
    color: #007aff;
}

#iosModal .modal-list li:before {
    color: #007aff;
}

#iosModal .step-number {
    background: linear-gradient(45deg, #007aff, #5ac8fa);
}

/* Android Modal Specific Styles */
#androidModal .modal-icon {
    color: var(--accent-android);
    background: rgba(61, 220, 132, 0.1);
}

#androidModal .modal-section h4:after {
    background: var(--gradient-android);
}

#androidModal .tech-name {
    color: var(--accent-android);
}

#androidModal .modal-list li:before {
    color: var(--accent-android);
}

#androidModal .step-number {
    background: var(--gradient-android);
}

/* Web Modal Specific Styles */
#webModal .modal-icon {
    color: var(--primary);
    background: rgba(60, 101, 255, 0.1);
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-tech-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        padding: 20px 20px 15px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
}