/**
 * ColorMag Modal Popup Styles
 * Styles for the modal popup overlay
 */

/* Modal Overlay */
.colormag-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    overflow-y: auto;
    padding: 20px;
}

.colormag-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Content */
.colormag-modal-content {
    background: #fff;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.colormag-modal-overlay.show .colormag-modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Modal Close Button */
.colormag-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.colormag-modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

/* Modal Header */
.colormag-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
}

.colormag-modal-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.3;
}

.colormag-modal-meta {
    color: #666;
    font-size: 14px;
}

.modal-meta-items {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-meta-items span {
    display: inline-block;
}

.meta-date::before {
    content: "📅 ";
}

.meta-author::before {
    content: "✍️ ";
}

.meta-category {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Modal Body */
.colormag-modal-body {
    padding: 30px;
}

.colormag-modal-text {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

.colormag-modal-text p {
    margin-bottom: 15px;
}

.colormag-modal-text img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* Modal Footer */
.colormag-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    text-align: right;
}

.colormag-modal-readmore {
    display: inline-block;
    background: #207daf;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.colormag-modal-readmore:hover {
    background: #1a5f89;
}

/* Loading State */
.modal-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Body overflow control */
body.modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .colormag-modal-content {
        margin: 20px 10px;
        max-height: 100vh;
    }
    
    .colormag-modal-header {
        padding: 20px 20px 15px;
    }
    
    .colormag-modal-title {
        font-size: 22px;
    }
    
    .colormag-modal-body {
        padding: 20px;
    }
}