/* Download Modal Styles */

/* Base modal styles */
.login-prompt,
.download-confirmation-modal,
.os-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    contain: layout style paint;
    will-change: opacity;
}

/* Modal content containers */
.login-prompt-content,
.download-confirmation-modal .modal-content,
.os-selection-modal .modal-content {
    background: white;
    border-radius: 8px;
    margin: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.login-prompt-content {
    padding: 30px;
    text-align: center;
    max-width: 400px;
}

.download-confirmation-modal .modal-content {
    max-width: 600px;
}

.os-selection-modal .modal-content {
    max-width: 500px;
}

/* Modal headers */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

/* Modal body */
.modal-body {
    padding: 20px;
}

/* Close button */
.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

/* Login prompt specific styles */
.login-prompt-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* OS info section */
.os-info {
    margin-bottom: 20px;
}

.os-info p {
    margin: 10px 0;
}

/* OS buttons container */
.os-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

/* OS selection grid */
.os-selection {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.os-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease;
}

.os-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.os-btn i {
    font-size: 20px;
}

/* Installation notes */
.installation-notes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.installation-notes h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.installation-notes ul {
    margin: 0;
    padding-left: 20px;
}

.installation-notes li {
    margin-bottom: 5px;
}


/* Button styles - ensure consistency with existing theme */
.button__blue,
.button__orange,
.button__transparent {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
}

.button__blue {
    background-color: #007bff;
    color: white;
}

.button__blue:hover {
    background-color: #0056b3;
}

.button__orange {
    background-color: #ff6b35;
    color: white;
    display: flex;
    margin-top: 40px;
    margin-bottom: 40px;
}

.button__orange:hover {
    background-color: #d4542a;
    color: white;
}

.button__orange--gspace {
    font-size: 16px;
    text-transform: uppercase;
    max-width: 700px;
    width: 80%;
}

.button__orange--gviewer {
    margin: 0;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
}


.button__orange--main {
    margin: 0;
    margin-right: 15px;
    display: inline-block;
    padding: 7px 20px;
    font-size: 16px;
}

.button__transparent {
    background-color: transparent;
    color: #007bff;
    border: 1px solid #007bff;
}

.button__transparent:hover {
    background-color: #007bff;
    color: white;
}

/* Loading state */
.button__blue:disabled,
.button__orange:disabled,
.button__transparent:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
    .login-prompt-content,
    .download-confirmation-modal .modal-content,
    .os-selection-modal .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }

    .os-selection {
        flex-direction: column;
        align-items: center;
    }

    .os-btn {
        width: 200px;
        justify-content: center;
    }

    .os-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .login-prompt-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animation for modal appearance */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content,
.login-prompt-content {
    animation: modalFadeIn 0.3s ease-out;
    will-change: transform, opacity;
    contain: layout style paint;
}

/* Download Progress Indicator Styles */
.download-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.download-progress-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    animation: modalFadeIn 0.3s ease-out;
}

.circular-progress {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    stroke-dasharray: 326.56; /* 2 * PI * 52 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.3s ease;
    animation: progressRotate 2s linear infinite;
    will-change: stroke-dashoffset;
}

@keyframes progressRotate {
    0% {
        stroke-dashoffset: 326.56;
    }
    50% {
        stroke-dashoffset: 163.28;
    }
    100% {
        stroke-dashoffset: 326.56;
    }
}

.progress-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    color: #007bff;
    animation: downloadPulse 2s ease-in-out infinite;
}

@keyframes downloadPulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

.progress-title {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.progress-message {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 14px;
}

.progress-software-name {
    margin: 5px 0 0 0;
    color: #007bff;
    font-weight: 600;
    font-size: 16px;
}

/* Download complete / fallback state */
.download-complete-icon {
    font-size: 56px;
    color: #28a745;
    margin-bottom: 20px;
    animation: completeFadeIn 0.4s ease-out;
}

@keyframes completeFadeIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.download-fallback-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    animation: completeFadeIn 0.3s ease-out;
}

.download-fallback-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: #007bff;
    color: #fff;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.download-fallback-link:hover {
    background-color: #0056b3;
    color: #fff;
}

.download-fallback-close {
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 16px;
    transition: color 0.2s ease;
}

.download-fallback-close:hover {
    color: #333;
}