/* Base styles */
body, html {
    margin: 0;
    padding: 0;
    overflow: hidden; /* Hide whitespace at the top */
    font-family: Arial, sans-serif;
    height: 100%;
}

/* Main map container */
#aladin-lite-div {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

/* Controls panel */
#controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    margin-left: 15%;
    transition: all 0.3s ease;
    cursor: move;
    user-select: none;
}

#controlsDiv {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    cursor: move;
}

.controls-title {
    font-weight: bold;
    margin: 0;
}

#toggle-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

#toggle-controls:hover {
    background-color: #45a049;
}

/* Button and form controls */
button {
    margin: 5px;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

select {
    padding: 8px;
    margin: 5px;
}

.opacity-control {
    margin: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.opacity-control label {
    min-width: 60px;
}

.opacity-control input[type="range"] {
    width: 100px;
}

.opacity-value {
    min-width: 30px;
    text-align: right;
}

/* Tour-specific controls */
.tourControls {
    margin-top: 10px;
}

.tourControls button {
    background: #3498db;
    border: none;
    color: white;
    padding: 8px 15px;
    margin-right: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.tourControls button:hover {
    background: #2980b9;
}

#tour-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    height: 80px;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 10px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: move;
    user-select: none;
}

#tour-controls button {
    background-color: #2962FF;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

#tour-controls button:hover {
    background-color: #0D47A1;
}

/* Waypoint info */
.waypoint {
    margin-bottom: 15px;
}

.waypointTitle {
    font-weight: bold;
    margin-bottom: 5px;
}

.waypointDesc {
    font-size: 0.9em;
    margin-bottom: 5px;
    max-width: 300px;
}

#waypoint-info {
    position: absolute;
    top: 20px;
    left: 80%;
    max-width: 400px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    z-index: 100;
    cursor: move;
    user-select: none;
}

#waypoint-title {
    font-size: 1.4em;
    margin: 0 0 10px 0;
    color: #2962FF;
}

#waypoint-description {
    font-size: 0.9em;
    line-height: 1.5;
    color: white;
}

#waypointInfoDiv {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    max-width: 350px;
}

.tour-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 5px;
    max-width: 400px;
}

/* Progress indicators */
#progress-bar {
    height: 5px;
    background-color: #444;
    width: 200px;
    border-radius: 5px;
    overflow: hidden;
}

#progress {
    height: 100%;
    background-color: #2962FF;
    width: 0%;
    transition: width 0.3s;
}

#current-waypoint {
    min-width: 40px;
    text-align: center;
}

/* Loading indicators */
#loading, #loadingDiv, #loading-div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 1001;
    text-align: center;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Basic default styling for Aladin tours */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
}

#aladin-lite-div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#loading-div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #fff;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
}

/* Region editing controls */
#region-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: move;
    user-select: none;
}

#region-toggle-btn {
    background-color: #2962FF;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    min-width: 120px;
}

#region-toggle-btn:hover {
    background-color: #0D47A1;
}

#region-toggle-btn.active {
    background-color: #4CAF50;
}

#region-toggle-btn.active:hover {
    background-color: #45a049;
}

#region-controls.editing {
    border: 2px solid #4CAF50;
}

.region-instructions {
    color: #fff;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    max-width: 200px;
    line-height: 1.3;
}

.region-instructions.visible {
    display: block;
}