/* WebRTC_Server/webpage/static/css/style.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

#login-page {
    max-width: 400px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.tabs {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: #e0e0e0;
    cursor: pointer;
    transition: background 0.3s;
}

.tab.active {
    background: #007bff;
    color: white;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input, button, select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background: #007bff;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #0056b3;
}

#dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-section {
    width: 100%;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.channel-control .channel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.volume, .volume-control {
    width: 50%;
}

.channel h3 {
    margin: 0;
}

.group h3 {
    margin: 0;
}


.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#admin-dashboard, #audio-engineer-dashboard {
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.active {
    color: green;
}

#draggable-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(244px, 1fr));
    /*gap: 20px;*/
    padding: 15px;
    background: #f9f9f9;
    /*min-height: 400px;*/
    overflow-y: auto;
    overflow-x: hidden;
   /* max-width: 100%;*/
    box-sizing: border-box;
}

@media (max-width: 767px) {
    #draggable-section {
        grid-template-columns: 1fr;
        /*gap: 15px;*/
    }
}

.draggable {
    width: fit-content;
    margin: 5px 5px;
    padding: 5px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    touch-action: none;
    transition: transform 0.2s ease;
}

.draggable.channel {
    background: #f0f8ff;
}

.draggable.group {
    background: #fff0f0;
}

.draggable.dragging {
    opacity: 0.7;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    width: inherit; /* Maintain original width during drag */
    max-width: inherit; /* Prevent stretching to full screen */
    position: relative; /* Override any absolute positioning if possible */
}

.grip {
    font-size: 24px;
    width: 30px;
    text-align: center;
    cursor: grab;
}

.element {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.buttons {
    display: flex;
    gap: 5px;
}

button {
    padding: 8px 12px;
    min-width: 60px;
}

.volume {
    width: 100px;
}

.form-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #ccc;
}

.form-popup h3 {
    margin-top: 0;
    color: #333;
}

.form-popup label {
    display: block;
    margin: 10px 0;
}

.form-popup input[type="checkbox"] {
    margin-right: 5px;
}

.form-popup button {
    width: 100%;
    margin-top: 15px;
}

.form-popup select {
    width: 100%;
}

.form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

#dashboard-content {
    position: relative;
    z-index: 1;
}

.story-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 8px;
}

.story-panel {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.story-panel h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
}

.story-visual {
    width: 100%;
    height: 200px;
    margin: 10px 0;
}

.story-visual canvas {
    max-width: 100%;
    height: 100% !important;
}

.story-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.3d-container {
    width: 100%;
    height: 200px;
    position: relative;
}

.3d-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.widget-cloud {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 8px;
}

.widget-panel {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.widget-panel h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
}

.widget-visual {
    width: 100%;
    height: 200px;
    margin: 10px 0;
}

.widget-visual canvas {
    max-width: 100%;
    height: 100% !important;
}

.widget-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Phase 4: Map-related styles */
.map-mobile, .map-command {
    width: 100%;
    height: 400px;
    position: relative;
}

.map-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.map-controls select, .map-controls input, .map-controls button {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.map-controls button {
    background: #007bff;
    color: white;
}

.map-controls button:hover {
    background: #0056b3;
}

.map-comms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
}

.map-container {
    width: 100%;
    height: 200px;
}

/* Phase 5: Command Center Styles */
.command-horseshoe {
    position: relative;
    width: 100%;
    height: 600px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.command-avatar {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.command-avatar:hover {
    transform: scale(1.1);
}

.command-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.avatar-popup {
    position: absolute;
    background: white;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.hologram-container {
    width: 100%;
    height: 600px;
    position: relative;
}

.ai-command {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 8px;
}

.ai-cluster-panel {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex: 1 1 300px;
}
