/**
 * IsardVDI Plugin - Frontend Styles
 */

/* Viewer Container */
.isardvdi-viewer-container {
    position: relative;
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Loading State */
.isardvdi-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    color: #fff;
    z-index: 10;
}

.isardvdi-loading p {
    margin-top: 20px;
    font-size: 16px;
    color: #ccc;
}

/* Loading Spinner */
.isardvdi-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #fff;
    border-radius: 50%;
    animation: isardvdi-spin 1s linear infinite;
}

@keyframes isardvdi-spin {
    to { transform: rotate(360deg); }
}

/* Hide loading when iframe is loaded */
.isardvdi-viewer-container.loaded .isardvdi-loading {
    display: none;
}

.isardvdi-viewer-container.loaded iframe {
    display: block !important;
}

/* Error Messages */
.isardvdi-error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
}

/* Link Styles */
.isardvdi-link {
    display: inline-block;
    text-decoration: none;
    color: #0073aa;
    transition: color 0.2s ease;
}

.isardvdi-link:hover {
    color: #005177;
    text-decoration: underline;
}

/* Button Styles */
.isardvdi-button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.isardvdi-button:hover {
    background-color: #005177;
    color: #fff !important;
}

/* Fullscreen Support */
.isardvdi-viewer-container:-webkit-full-screen {
    width: 100%;
    height: 100%;
}

.isardvdi-viewer-container:-moz-full-screen {
    width: 100%;
    height: 100%;
}

.isardvdi-viewer-container:fullscreen {
    width: 100%;
    height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .isardvdi-viewer-container {
        width: 100% !important;
        height: 400px !important;
    }
    
    .isardvdi-loading p {
        font-size: 14px;
    }
}

/* Connection Status */
.isardvdi-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
    z-index: 100;
}

.isardvdi-status.connected {
    background-color: rgba(40, 167, 69, 0.9);
}

.isardvdi-status.disconnected {
    background-color: rgba(220, 53, 69, 0.9);
}

.isardvdi-status.connecting {
    background-color: rgba(255, 193, 7, 0.9);
}
