/* Project Page Specific Styles */
:root {
    --primary-color: #0078d7;
    --primary-rgb: 0, 120, 215;
    --secondary-color: #005a9e;
    --light-color: #f5f5f5;
    --dark-color: #333;
    --success-color: #28a745;
    --border-radius: 5px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--light-color);
    color: var(--dark-color);
    overflow-x: hidden;
    padding-right: 450px; /* Make space for the VM panel */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

.page-grid {
    display: block;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.content-column {
    flex: 1;
    min-width: 0; /* Prevent content from overflowing */
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 0 20px;
}

/* VM Panel Styles */
.vm-column {
    width: 450px;
    position: fixed;
    top: 0;
    right: 0;
    
    /* Logout button styles */
    .logout-container {
        display: flex;
        justify-content: center;
        margin: 1.5rem 0;
        padding: 0 1.5rem;
    }
    
    .logout-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.6rem 1.2rem;
        background-color: #e74c3c;
        color: white;
        border: none;
        border-radius: var(--border-radius);
        font-size: 0.9rem;
        font-weight: 500;
        cursor: pointer;
        transition: var(--transition);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .logout-btn:hover {
        background-color: #c0392b;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    
    .logout-btn i {
        font-size: 1rem;
    }
    bottom: 0;
    height: 100vh;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    z-index: 90; /* Below the main page header */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent any overflow */
}

.vm-column-content {
    position: absolute;
    top: 70px; /* Start below the header */
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.75rem 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 1;
}

.vm-column h2 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 18px 25px;
    margin: 0;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.3rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 70px;
    box-sizing: border-box;
    z-index: 10; /* Ensure header stays above content */
}

.vm-column h2::before {
    content: '💻';
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* VM Card Styles */
.vm-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding: 0.25rem;
    width: calc(100% - 0.5rem);
    margin-left: auto;
    margin-right: auto;
}

.vm-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 4px; /* Space for shadow without transform */
}

.vm-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.vm-header {
    padding: 1rem 1.25rem;
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vm-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

.vm-status {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vm-status.active {
    background-color: #28a745;
    color: white;
}

.vm-status.inactive {
    background-color: #6c757d;
    color: white;
}

.vm-body {
    padding: 1.25rem;
    background-color: #fcfcfc;
    box-sizing: border-box;
}

.vm-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.vm-info-item {
    padding: 0.5rem;
    background-color: rgba(0, 120, 215, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.vm-description {
    margin-bottom: 1rem;
    font-style: italic;
    color: #555;
    line-height: 1.5;
}

.connect-btn {
    display: block;
    width: calc(100% - 2px); /* Account for border */
    text-align: center;
    margin-top: 1.25rem;
    padding: 0.75rem 0;
    background-color: #28a745; /* Green color for connect button */
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    border: none;
    box-sizing: border-box;
}

.connect-btn:hover {
    background-color: #218838; /* Darker green on hover */
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Content Styles */
a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Header styles */
header {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    z-index: 101; /* Ensure header is above VM panel */
}

header p, p.tagline {
    text-align: center;
    margin: 0 auto;
    width: 100%;
    display: block;
}

.tagline {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

header h1 {
    margin-bottom: 0.5rem;
}

header i {
    margin-right: 0.5rem;
}

section {
    margin-bottom: 2rem;
}

section h2 {
    text-align: left;
    color: var(--primary-color);
    margin: 2rem 0 1.2rem;
    font-size: 1.8rem;
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.2);
    padding-bottom: 0.5rem;
}

p {
    margin: 0 0 1.2rem;
    line-height: 1.6;
    text-align: left;
}

ul, ol {
    text-align: left;
    margin: 1rem 0 1.5rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    margin-top: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.download-btn {
    margin: 0.5rem 0;
    display: inline-block;
    min-width: 120px;
    text-align: center;
}

/* Script Box and Code Preview Styles */
.script-box {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 0 0 2rem;
    box-shadow: var(--box-shadow);
    text-align: left;
}

/* Available Scripts Section Styling */
.scripts-section {
    background-color: rgba(var(--primary-rgb), 0.03);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.scripts-section h2 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.2);
    padding-bottom: 0.75rem;
}

.code-preview {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    margin: 1.5rem 0;
    text-align: left;
}

/* Guacamole Login Form Styles */
.guacamole-login {
    background-color: rgba(var(--primary-rgb), 0.05);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    margin-bottom: 1.5rem;
}

.guacamole-login h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-align: left;
    font-size: 1.2rem;
}

.guacamole-login .form-group {
    margin-bottom: 1rem;
}

.guacamole-login label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.guacamole-login input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

/* Message styles */
.error-message {
    color: #dc3545;
    padding: 0.5rem;
    margin-top: 1rem;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: var(--border-radius);
    text-align: center;
}

.success-message {
    color: #28a745;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    background-color: rgba(40, 167, 69, 0.1);
    border-radius: var(--border-radius);
    text-align: center;
}

.message-box {
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.message-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.warning-message {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Responsive Styles */
@media (max-width: 768px) {
    body {
        padding-right: 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .page-grid {
        padding-right: 0;
    }
    
    .vm-column {
        width: 100%;
        position: static;
        height: auto;
        margin: 1rem 0 2rem;
        border-left: none;
        border-top: 4px solid var(--primary-color);
        box-shadow: none;
    }
    
    .vm-column-content {
        padding: 1rem;
        padding-top: 1rem;
        height: auto;
        overflow: visible;
    }
    
    .vm-column h2 {
        position: relative;
        height: auto;
    }
    
    .project-header {
        flex-direction: column;
        text-align: center;
    }
    
    .project-header i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .vm-list {
        grid-template-columns: 1fr;
    }
}
