/* Facebook-style Modal */
.erasmuser-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.85);
}

.erasmuser-modal-content {
    background-color: #f0f2f5;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.erasmuser-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #dddfe2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 10;
}

.erasmuser-modal-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.erasmuser-modal-header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.erasmuser-modal-logo {
    display: flex;
    align-items: center;
}

.erasmuser-modal-logo img {
    width: 120px;
    height: auto;
    object-fit: contain;
    max-height: 40px;
}

.erasmuser-modal-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #1877f2;
    width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erasmuser-modal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.erasmuser-modal-mobile-actions {
    display: none;
    align-items: center;
    gap: 8px;
}

.erasmuser-modal-mobile-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: transparent;
    color: #1877f2;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
}

.erasmuser-modal-mobile-action:hover {
    color: #166fe5;
    text-decoration: none;
}

.erasmuser-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #1c1e21;
    font-weight: 600;
}

.erasmuser-modal-back {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: #e4e6eb;
    color: #1c1e21;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: fit-content;
}

.erasmuser-modal-back svg {
    margin-right: 8px;
}

.erasmuser-modal-back:hover {
    background-color: #d8dadf;
}

.erasmuser-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e4e6eb;
    color: #1c1e21;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.erasmuser-modal-close:hover {
    background-color: #d8dadf;
}

.erasmuser-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100% - 80px);
}

/* Left and right sections */
.erasmuser-modal-left-section {
    width: 70%;
    height: 100%;
    background-color: #000;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dddfe2;
}

.erasmuser-modal-right-section {
    width: 30%;
    height: 100%;
    background-color: #ffffff;
    overflow-y: auto;
    padding: 0 20px 20px;
}

.erasmuser-modal-right-section h3 {
    font-size: 1.5rem;
    color: #1c1e21;
    margin-bottom: 12px;
    font-weight: 600;
}

.erasmuser-modal-right-section h4 {
    font-size: 1.1rem;
    color: #1c1e21;
    margin: 20px 0 12px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* Content Container */
.erasmuser-modal-content-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.erasmuser-modal-content-container object,
.erasmuser-modal-content-container iframe,
.erasmuser-modal-content-container embed {
    width: 100%;
    height: 100%;
    border: none;
}

/* Iframe Error Fallback Styles */
.iframe-error-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.iframe-error-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 40px 20px;
}

.iframe-error-icon {
    color: #ffc107;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.iframe-error-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: white;
    font-weight: 600;
}

.iframe-error-content p {
    font-size: 1rem;
    margin-bottom: 24px;
    color: #ccc;
    line-height: 1.5;
}

.canva-fallback-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #00c4cc;
    color: white !important;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    border: 2px solid #00c4cc;
}

.canva-fallback-button:hover {
    background-color: #00b3ba;
    border-color: #00b3ba;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 196, 204, 0.4);
    color: white !important;
    text-decoration: none;
}

.canva-fallback-button:active {
    transform: translateY(-1px);
}

.canva-fallback-button svg {
    flex-shrink: 0;
}

/* Canva Notice */
.canva-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-top: 12px;
}

.canva-notice svg {
    color: #6c757d;
    margin-top: 2px;
    flex-shrink: 0;
}

.canva-notice small {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .erasmuser-modal-body {
        flex-direction: column;
        height: calc(100vh - 80px); /* Ensure full viewport height minus header */
    }
    
    .erasmuser-modal-left-section {
        width: 100%;
        height: 100%;
        border-right: none;
        flex: 1; /* Take all available flex space */
    }
    
    .erasmuser-modal-right-section {
        display: none; /* Hide right section on mobile */
    }
    
.erasmuser-modal-detail-icon,
.erasmuser-modal-info-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #555;
    transition: color 0.2s ease;
}

.erasmuser-modal-detail-item:hover .erasmuser-modal-detail-icon,
.erasmuser-modal-info-item:hover .erasmuser-modal-info-icon {
    color: #28a745;
}    .erasmuser-modal-detail-item,
    .erasmuser-modal-info-item {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .erasmuser-modal-header {
        padding: 10px 15px;
    }
    
    .erasmuser-modal-header-center {
        width: 100%;
        position: relative;
        left: auto;
        transform: none;
        text-align: center;
        margin: 0 auto;
        display: none;
    }
    
    .erasmuser-modal-back {
        display: none !important;
    }
    
    .erasmuser-modal-mobile-actions {
        display: flex !important;
    }
    
    .erasmuser-modal-logo {
        max-width: 120px;
    }
    
    .erasmuser-modal-logo img {
        width: 100px;
        max-height: 36px;
    }
    
    .erasmuser-modal-header h2 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .erasmuser-modal-header-left {
        gap: 10px;
    }
    
    .erasmuser-modal-logo img {
        width: 90px;
    }
    
    .erasmuser-modal-back {
        padding: 4px 8px;
        font-size: 11px;
    }
}

.modal-button-container {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .modal-button-container {
        justify-content: center;
        gap: 10px;
    }
    
    .erasmuser-modal-button {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    .erasmuser-modal-apply-button {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* Base button styles */
.erasmuser-modal-button {
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.erasmuser-modal-button svg {
    transition: transform 0.2s ease;
    margin-right: 8px;
    flex-shrink: 0;
}

.erasmuser-modal-button:hover svg {
    transform: translateX(1px);
}

.erasmuser-modal-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

/* Outlined button styles (default for download/Canva buttons) */
.erasmuser-modal-button {
    background-color: transparent;
    color: #28a745;
    border: 2px solid #28a745;
}

.erasmuser-modal-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(40, 167, 69, 0.1), transparent);
    transition: left 0.5s;
}

.erasmuser-modal-button:hover::before {
    left: 100%;
}

.erasmuser-modal-button:hover {
    background-color: #28a745;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.erasmuser-modal-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.2);
}

/* Apply button - filled style */
.erasmuser-modal-apply-button {
    background-color: #28a745 !important;
    color: white !important;
    border: 2px solid #28a745 !important;
    font-size: 15px;
    padding: 12px 24px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
    position: relative;
    overflow: hidden;
}

.erasmuser-modal-apply-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.erasmuser-modal-apply-button:hover::before {
    left: 100%;
}

.erasmuser-modal-apply-button:hover {
    background-color: #218838 !important;
    border-color: #218838 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.erasmuser-modal-apply-button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.erasmuser-modal-apply-button:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

/* Close button styles */
.erasmuser-modal-close-button {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.erasmuser-modal-close-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

/* Project Details with Icons */
.erasmuser-modal-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.erasmuser-modal-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.erasmuser-modal-detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #e7f7ea;
    border-radius: 50%;
    color: #28a745;
    flex-shrink: 0;
}

.erasmuser-modal-detail-content {
    display: flex;
    flex-direction: column;
}

.erasmuser-modal-detail-label {
    font-size: 12px;
    color: #65676b;
    margin-bottom: 2px;
}

.erasmuser-modal-detail-value {
    font-size: 14px;
    color: #1c1e21;
    font-weight: 500;
}

/* Document Information with Icons */
.erasmuser-modal-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.erasmuser-modal-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.erasmuser-modal-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: #f0f2f5;
    border-radius: 50%;
    color: #28a745;
    flex-shrink: 0;
}