@font-face {
    font-family: 'Roboto-Bold';
    src: url(f80816a5455d171f948d.ttf) format('truetype');
}

:root {
    --primary-font: 'Roboto-Bold', "sans-serif";
    --secondary-font: "Arial", "monospace";
    --background-color: rgba(0, 0, 0, 0.8);
    --backdrop-color: rgba(255, 255, 255, 0.403);
    --loading-background-color: #000000;
    --title-color: #ffffff;
    --text-color: #ffffff;
    --fog-color: #668daa;
    --scrollbar-color: #ffffff17;
    --submit-area-color: #000000ab;
    --trans-text-light: rgba(162, 162, 162, 0.5);
    --trans-text-strong: rgba(162, 162, 162, 0.8);
    --button-alt-color: #25a7ed;
    --button-alt-hover-color: #1d8dbf;
    --button-color: #4CAF50;
    --button-hover-color: #3c8c3e;
    --button-remove-color: #c94940;
    --button-remove-hover-color: #c23f36;
    --XRButton-hover-color: #9c2d7e;
    --color-success: #4CAF50;;
    --color-warning: #ffc107; 
    --color-error: #c94940; 
}

body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--primary-font);
}

#scene-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#dot-cursor {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background-color: var(--title-color);;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1000;
} 
#startExperienceButton {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-family: var(--primary-font);
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    z-index: 99999;
    overflow: hidden;
}

#startExperienceButton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: all 0.5s;
}

#startExperienceButton:hover {
    background-color: var(--button-hover-color);
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

#startExperienceButton:hover::before {
    left: 100%;
}

#startExperienceButton {
    display: none; /* Initially hidden */
    opacity: 0;
    animation: fadeInScale 0.3s forwards; /* Fade-in and scale animation */
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.0);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}


.cog-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

#cog-icon {
    background: none;
    border: none;
    cursor: pointer;
    animation: float 3s ease-in-out infinite;
}

.esc-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    display: flex;
    align-items: center;
}

#esc-icon {
    background: none;
    width: 35px;
    height: 35px;
    border: none;
    display: inline-block;
    vertical-align: middle;
    background-color: transparent;
    border: none;
}

#esc-text {
    font-family: var(--primary-font);
    font-size: 12px;
    color: var(--title-color);
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle; 
}

.tooltip-icon {
    cursor: pointer;
    display: inline-block;
    position: relative;
    transform: translateY(-2px);
    font-size: 12px;    
    margin-left: 5px;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    max-width: 200px; 
    background-color: black;
    font-size: 12px;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 100;
    white-space: normal;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tooltip-icon:hover .tooltip-text,
.tooltip-icon:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(-5px);
    }
    50% {
        transform: translateY(5px);
    }
}
/* Base Container Styles */
.loading-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    z-index: 2000;
    opacity: 0;
    transition: opacity 2s;
}

.loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    text-align: center;
    width: min(90vw, 600px);
    padding: 2rem;
}

/* Logo Styles */
.loading-logo {
    width: clamp(160px, 30vw, 220px);
    height: auto;
    margin-bottom: 2rem;
    animation: logoFloat 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    will-change: transform;
}

/* Loading Text Styles */
.loading-text {
    color: var(--title-color);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin: 1.5rem 0;
    font-family: var(--primary-font);
    text-transform: uppercase;
    letter-spacing: 0.5em;
    opacity: 0.9;
    transform: translateX(0.25em); /* Offset for letter-spacing */
    animation: textPulse 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress Bar Styles */
.loading-progress-container {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loading-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--button-color) 0%,
        var(--button-color-hover, var(--button-color)) 100%
    );
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.loading-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: progressShimmer 2s infinite;
}

/* Percentage Text Styles */
.loading-percentage {
    color: var(--text-color);
    font-size: 1.1rem;
    font-family: var(--primary-font);
    margin-top: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* Animations */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.9;
        transform: translateX(0.25em) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(0.25em) scale(1.02);
    }
}

@keyframes progressShimmer {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(200%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .loading-container {
        padding: 1.5rem;
    }

    .loading-text {
        font-size: clamp(1.5rem, 4vw, 2rem);
        letter-spacing: 0.3em;
    }

    .loading-progress-container {
        height: 5px;
        margin: 1.5rem 0;
    }

    .loading-percentage {
        font-size: 1rem;
    }
}

.loading-spinner {
    border: 5px solid var(--button-color);
    border-top: 5px solid var(--button-hover-color);
    border-radius: 50%;
    width: 100px; 
    height: 100px; 
    animation: spin 1s linear infinite;

    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
/* Base Variables */
:root {
    --popup-z-index: 998;
    --popup-padding: 30px;
    --popup-border-radius: 12px;
    --popup-transition-duration: 0.5s;
    --popup-max-width: 90vh;
    --popup-max-height: 90vh;
    
    /* Colors from original system */
    --popup-bg-color: rgba(16, 16, 16, 0.9);
    --popup-overlay-color: rgba(0, 0, 0, 0.2);
    --popup-border-color: var(--trans-text-light);
    --popup-header-bg: rgba(0, 0, 0, 0.603);
  }
  
  /* Base Popup Container */
  .popup-base,
  .fullscreen-overlay-container {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--popup-z-index);
    justify-content: center;
    align-items: center;
    font-family: var(--primary-font);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--popup-transition-duration) ease,
                visibility var(--popup-transition-duration) ease;
  }
  
  .popup-base.active,
  .fullscreen-overlay-container.active {
    opacity: 1;
    visibility: visible;
    display: flex;
    pointer-events: auto;
  }
  
  /* Popup Overlay */
  .popup-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background-color: var(--popup-overlay-color);
    z-index: 998;
  }
  
  /* Popup Content Container */
  .popup-content {
    position: relative;
    pointer-events: all;
    background-color: var(--popup-bg-color);
    border-radius: var(--popup-border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: var(--popup-max-width);
    max-height: var(--popup-max-height);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-color);
    transform: scale(0.1);
    transition: transform var(--popup-transition-duration) cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity var(--popup-transition-duration) ease;
  }
  
  .popup-base.active .popup-content,
  .fullscreen-overlay-container.active .popup-content {
    transform: scale(1);
  }
  
  /* Popup Header */
  .popup-header {
    padding: calc(var(--popup-padding) * 0.4);
    border-bottom: 1px solid var(--popup-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--popup-header-bg);
  }
  
  .popup-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
  }

  .header-buttons {
    display: flex;
    gap: 10px;
  }
  
  /* Close Button */
  .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 8px;
    border-radius: 50%;
  }

  .close-btn:hover {
      color: var(--button-color);
      transform: rotate(90deg);
  }

  .close-btn svg {
      display: block;
      width: 24px;
      height: 24px;
  }
  
  .popup-body {
    padding: var(--popup-padding);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  
  /* Form Elements */
  .popup-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    margin-bottom: 15px;
    transition: border-color var(--popup-transition-duration) ease;
  }
  
  .popup-input:focus {
    outline: none;
    border-color: var(--button-color);
  }
  
  /* Buttons */
  .popup-button {
    padding: 12px 24px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color var(--popup-transition-duration) ease,
                transform 0.2s ease;
  }
  
  .popup-button:hover:not(:disabled) {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
  }
  
  .popup-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  /* Minimal Style Variant */
  /* Used for e-learning content - providing space for a content table to the right while keeping the popup minimalistic */

  .popup-base.style-minimal {
    
    /* no rounded corners */
    pointer-events: none;
    margin: 10px;
  }

  .popup-base.style-minimal .popup-content {
    background-color: transparent;
    box-shadow: none;
    max-width: 73%;
    max-height: 100%;
    height: 100%;
    pointer-events: auto;
  }

  .popup-base.style-minimal .popup-overlay {
    background-color: rgba(0, 0, 0, 0);
    /* no backdrop filter */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  
  .popup-base.style-minimal .popup-header {
    background-color: transparent;
    border-bottom: none;
    padding: 0;
  }

  .popup-base.style-minimal .popup-button {
    width: 100px;
  }

  .popup-base.style-minimal .close-btn {
    padding: 0;
  }

  .popup-base.style-minimal .close-btn svg {
    width: 15px;
    height: 15px;
  }

  /* Close Button not visible in minimal style */
  .popup-base.style-minimal .close-btn {
    display: none;
  }
  
  /* Scrollbar Styling */
  .popup-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  .popup-content::-webkit-scrollbar-track {
    background-color: var(--submit-area-color);
    border-radius: 4px;
  }

  .popup-content::-webkit-scrollbar-thumb {
    background-color:rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 2px solid var(--background-color);
  }

  .popup-content::-webkit-scrollbar-thumb:hover {
    background-color:rgba(0, 0, 0, 0.4);
  }

  .popup-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  .popup-body::-webkit-scrollbar-track {
    background-color: var(--submit-area-color);
    border-radius: 4px;
  }
  
  .popup-body::-webkit-scrollbar-thumb {
    background-color: var(--trans-text-light);
    border-radius: 4px;
    border: 2px solid var(--background-color);
  }
  
  .popup-body::-webkit-scrollbar-thumb:hover {
    background-color: var(--trans-text-strong);
  }

/* Style for occluded popups (when another popup is stacked on top) */
.popup-base.popup-occluded > .popup-content {
    opacity: 0.4; 
    pointer-events: none; 
}
  
  @media (max-width: 768px) {

    .popup-content {
      max-width: 95%;
      max-height: 95%;
    }

    .popup-header {
      padding: 15px;
    }
  
    .popup-header h2 {
      font-size: 16px;
    }

    .popup-body {
      margin: 2%;
    }
  
    .popup-button {
      width: 100%;
      margin-bottom: 10px;
    }

    .popup-base.style-minimal .popup-body {
      margin: 0;
    }

    .popup-base.style-minimal .text-content {
      margin: 0;
    }
  }
  
/* Cog Container Styles */
.cog-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    border-radius: 10%;
}

.cog-icon {
    width: 48px;
    height: 48px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cog-icon img {
    transition: filter 0.3s ease;
}

.cog-icon:hover {
    transform: rotate(90deg);
    background-color: var(--button-color);
}

.cog-icon:hover img {
    filter: brightness(5);
}

/* Dropdown Menu Styles */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 15px);
    background-color: var(--background-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: var(--primary-font);
    width: 220px;
    z-index: 1001;
    border: none;
    transform: translateY(-20px);
    opacity: 0;
    flex-direction: column;
}

.dropdown-menu.show {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Dropdown Arrow */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 30px;
    width: 20px;
    height: 20px;
    background-color: var(--background-color);
    transform: rotate(45deg);
    box-shadow: -3px -3px 7px rgba(0, 0, 0, 0.05);
}

/* Dropdown Items */
.dropdown-item {
    padding: 15px 20px;
    width: 100%;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    text-align: left;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--button-color);
    color: #fff;
}

.dropdown-item:hover .dropdown-icon {
    fill: #fff;
}

/* Styles for Icons within Dropdown Items */
.dropdown-icon {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    fill: var(--text-color);
}

.dropdown-item:hover .dropdown-icon {
    fill: #ffffff;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .cog-container {
        top: 10px;
        right: 10px;
    }

    .cog-icon {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .cog-icon img {
        width: 40px;
        height: 40px;
    }

    .dropdown-menu {
        width: 180px;
    }
    
    .dropdown-item {
        padding: 12px 16px;
        font-size: 14px;
    }

    .dropdown-icon {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }
}


.info-popup-container {
    display: flex;
    background-color: var(--background-color);
    flex-direction: column;
    align-items: center;
    padding: 10%;
    gap: 1.5rem;
}

.info-popup-text {
    width: 100%;
    text-align: center;
}

.info-popup-text h3 {
    color: var(--title-color);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.info-popup-text p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0.75rem 0;
    opacity: 0.9;
}

.info-popup-text img {
    width: auto;
    height: clamp(30px, 8vw, 50px);
    margin: 1rem auto;
    transition: transform 0.2s ease;
}

.info-popup-text img:hover {
    transform: scale(1.1);
}

.multiplayer-popup-body {
    padding: var(--popup-padding);
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow: auto;
}

.multiplayer-description {
    margin-bottom: 20px;
    color: var(--trans-text-strong);
    font-size: 16px;
}

.multiplayer-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.multiplayer-input-group {
    position: relative;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.multiplayer-input-group label {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
}

.multiplayer-input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    font-size: 16px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.multiplayer-input-group input::placeholder {
    color: rgb(71, 71, 71);
    font-size: 12px;
}
  

.multiplayer-input-group input:focus {
    outline: none;
    border-color: var(--button-color);
}

.multiplayer-room-info {
    background-color: var(--submit-area-color);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.multiplayer-room-id {
    display: block;
    color: var(--text-color);
    font-size: 16px;
    margin-bottom: 10px;
    word-break: break-all;
}

/* Session container specific styles */
#multiplayer-session-container .multiplayer-room-info {
    text-align: center;
}

/* Copy link button removed */

/* Scrollbar styling */
.multiplayer-popup ::-webkit-scrollbar,
.multiplayer-invitation-popup ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.multiplayer-popup ::-webkit-scrollbar-track,
.multiplayer-invitation-popup ::-webkit-scrollbar-track {
    background-color: rgba(var(--rgb-text-color), 0.1);
    border-radius: 5px;
}

.multiplayer-popup ::-webkit-scrollbar-thumb,
.multiplayer-invitation-popup ::-webkit-scrollbar-thumb {
    background-color: rgba(var(--rgb-text-color), 0.3);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.multiplayer-popup ::-webkit-scrollbar-thumb:hover,
.multiplayer-invitation-popup ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--rgb-text-color), 0.5);
}

/* Error state styles */
.multiplayer-input-group.error input {
    border-color: var(--error-color);
}

.multiplayer-input-group.error .error-message {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 5px;
}

/* Success state styles */
.multiplayer-input-group.success input {
    border-color: var(--success-color);
}

/* Room list specific styles */
.room-list-container {
    margin-top: 1.5rem;
    border: 1px solid var(--trans-text-light);
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: var(--submit-area-color);
}

.room-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.room-list-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.refresh-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    color: var(--text-color);
}

.refresh-button:hover {
    background-color: var(--trans-text-light);
}

.refresh-button.refreshing svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.room-list {

    overflow-y: auto;
    gap: 0.5rem;
    display: flex;
    flex-direction: column;
}

/* Scrollbar Styling */
.room-list::-webkit-scrollbar {
width: 8px;
height: 8px;
}

.room-list::-webkit-scrollbar-track {
background-color: var(--submit-area-color);
border-radius: 4px;
}

.room-list::-webkit-scrollbar-thumb {
background-color: var(--trans-text-light);
border-radius: 4px;
border: 2px solid var(--background-color);
}

.room-list::-webkit-scrollbar-thumb:hover {
background-color: var(--trans-text-strong);
}

.room-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--submit-area-color);
    border: 1px solid var(--trans-text-light);
    border-radius: 0.25rem;
    transition: background-color 0.2s, transform 0.2s;
}

.room-item:hover {
    background-color: var(--trans-text-light);
    transform: translateY(-1px);
}

.room-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.room-id {
    font-weight: 500;
    color: var(--text-color);
}

.player-count {
    font-size: 0.9rem;
    color: var(--trans-text-strong);
}

.join-room-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    background-color: var(--button-color);
    color: var(--button-text-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.join-room-btn:hover:not(:disabled) {
    background-color: var(--button-hover-color);
}

.join-room-btn:disabled {
    background-color: var(--trans-text-light);
    cursor: not-allowed;
}

.join-room-btn:not(:disabled):hover {
    transform: scale(1.05);
}

.no-rooms-message {
    text-align: center;
    padding: 1rem;
    color: var(--trans-text-strong);
    font-style: italic;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.button-group button {
    flex: 1;
}

.room-count {
    padding: 8px;
    color: var(--trans-text-strong);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--trans-text-light);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
}

.room-status.available {
    background-color: var(--success-color);
    color: white;
}

.room-status.full {
    background-color: var(--trans-text-light);
    color: var(--trans-text-strong);
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.player-avatars {
    display: flex;
    gap: -8px;
}

.player-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--button-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    border: 2px solid var(--submit-area-color);
}

.player-avatar.more {
    background-color: var(--trans-text-light);
    font-size: 0.7rem;
}

.no-rooms-message {
    text-align: center;
    padding: 2rem;
    color: var(--trans-text-strong);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.create-now-btn {
    background: none;
    border: none;
    color: var(--button-color);
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 8px;
}

.create-now-btn:hover {
    color: var(--button-hover-color);
}

/* Session players section styling */
.scene-group {
    margin-bottom: 1rem;
}

.scene-group:last-child {
    margin-bottom: 0;
}

.scene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: var(--trans-text-light);
    border-radius: 0.25rem;
}

.scene-name {
    font-weight: 500;
    color: var(--text-color);
}

.scene-count {
    font-size: 0.8rem;
    color: var(--trans-text-strong);
    padding: 2px 8px;
    background-color: var(--submit-area-color);
    border-radius: 12px;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.player-name {
    color: var(--text-color);
    font-weight: 500;
}

.player-id {
    font-size: 0.8rem;
    color: var(--trans-text-strong);
    opacity: 0.8;
}

.session-players {
    margin-top: 1.5rem;
    border: 1px solid var(--trans-text-light);
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: var(--submit-area-color);
}

.session-players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--trans-text-light);
}

.session-players-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.session-players .player-count {
    font-size: 0.9rem;
    color: var(--trans-text-strong);
    background-color: var(--trans-text-light);
    padding: 2px 8px;
    border-radius: 12px;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--submit-area-color);
    border: 1px solid var(--trans-text-light);
    border-radius: 0.25rem;
    transition: background-color 0.2s, transform 0.2s;
}

.player-item:hover {
    background-color: var(--trans-text-light);
}

.player-item .player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--button-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid var(--submit-area-color);
}

.player-item .player-name {
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Scrollbar styling for player list */
.player-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.player-list::-webkit-scrollbar-track {
    background-color: var(--submit-area-color);
    border-radius: 4px;
}

.player-list::-webkit-scrollbar-thumb {
    background-color: var(--trans-text-light);
    border-radius: 4px;
    border: 2px solid var(--background-color);
}

.player-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--trans-text-strong);
}

/* Media Queries */
@media (max-width: 768px) {

    .multiplayer-form {
        gap: 15px;
    }

    .multiplayer-input-group input {
        padding: 10px 12px;
        font-size: 15px;
    }

    .multiplayer-description {
        font-size: 14px;
    }

    .room-item {
        flex-direction: column;
    }

    .session-players {
        margin-top: 1rem;
        padding: 0.75rem;
    }

    .player-item {
        padding: 0.5rem;
    }

    .player-item .player-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}

/* User Management Popup Content */
.um-popup-content {
    position: relative;
    z-index: 2;
    background-color: var(--popup-bg-color);
    border-radius: var(--popup-border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-height: var(--popup-max-height);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-color);
}

.um-popup-body {
    padding: var(--popup-padding);
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: auto;
}

.um-user-list-section {
    flex: 1;
    padding: 30px;
}

/* Headings */
.um-popup h3 {
    margin-top: 0;
    color: var(--title-color);
    font-size: 22px;
    margin-bottom: 20px;
}

.um-input {
    margin-bottom: 20px;
    padding: 12px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    font-size: 16px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.um-input:focus {
    outline: none;
    border-color: var(--button-color);
}

/* Buttons */
.um-button,
.popup-button.edit-user-btn {
    padding: 12px 20px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.um-button:hover,
.popup-button.edit-user-btn:hover {
    background-color: var(--button-hover-color);
}

.um-button,
.um-add-user-btn {
    margin-bottom: 10px;
    margin-top: 10px;
}

/* User List Section */
.um-user-list-container {
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 8px;
    background: var(--submit-area-color);
    margin-top: 15px;
}

/* Column Headers */
.um-list-headers {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    padding: 12px 15px;
    background: black;
    border-bottom: 2px solid var(--trans-text-light);
    font-weight: 600;
    color: var(--trans-text-strong);
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.um-list-headers span {
    white-space: nowrap;
}

.um-user-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.um-user-list li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--trans-text-light);
    transition: background-color 0.2s ease;
}

.um-user-list li:last-child {
    border-bottom: none;
}

.um-user-list li:hover {
    background-color: rgba(var(--rgb-text-color), 0.05);
}

/* Email and Role Styling */
.user-email {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    color: var(--trans-text-strong);
    font-size: 14px;
    padding: 4px 8px;
    background: rgba(var(--rgb-text-color), 0.1);
    border-radius: 4px;
    white-space: nowrap;
}

/* Edit Button */
.popup-button.edit-user-btn {
    padding: 6px 12px;
    font-size: 14px;
    background-color: var(--button-alt-color);
}

.popup-button.edit-user-btn:hover {
    background-color: var(--button-alt-hover-color);
}

/* Search Input */
#user-search {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    font-size: 14px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

#user-search:focus {
    outline: none;
    border-color: var(--button-color);
}

/* Scrollbar Styling */
.um-user-list-container::-webkit-scrollbar {
    width: 6px;
}

.um-user-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.um-user-list-container::-webkit-scrollbar-thumb {
    background-color: rgba(var(--rgb-text-color), 0.2);
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.um-user-list-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--rgb-text-color), 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .um-popup-body {
        flex-direction: column;
        padding: 0px;
    }

    .um-user-list li {
        grid-template-columns: 1fr auto;
    }

    .user-role {
        font-size: 12px;
    }

    .um-list-headers {
        grid-template-columns: 1fr auto;
    }

    .um-list-headers span:last-child {
        display: none;
    }

    .um-button,
    .popup-button.edit-user-btn {
        width: 15vh;
        margin-top: 10px;
    }
}
.settings-description {
    color: var(--trans-text-strong);
    font-size: 1rem;
    margin: 0;
    padding-bottom: 1rem;
}

/* Control Groups */
.settings-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--trans-text-light);
}

.settings-control:last-child {
    border-bottom: none;
}

/* Compact variant for dense layouts (AI settings) */
.settings-control.compact {
    padding: 0.25rem 0;
    gap: 0.25rem;
}

/* AI settings arranged in responsive grid */
.ai-settings-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    margin: 0.5rem 0 1rem;
}

@media (max-width: 480px) {
    .ai-settings-group {
        grid-template-columns: 1fr;
    }
}

.settings-label {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
}

/* Volume Slider */
.settings-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(
        to right,
        var(--button-color) 0%,
        var(--button-color) var(--volume-percentage, 50%),
        var(--trans-text-light) var(--volume-percentage, 50%),
        var(--trans-text-light) 100%
    );
    border-radius: 3px;
    outline: none;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--button-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.settings-slider::-webkit-slider-thumb:hover,
.settings-slider.settings-slider-active::-webkit-slider-thumb {
    transform: scale(1.2);
    background: var(--button-hover-color);
}

.settings-value {
    min-width: 45px;
    color: var(--text-color);
    font-size: 0.875rem;
}

/* Toggle Switch */
.settings-toggle-wrapper {
    position: relative;
    width: 60px;
    height: 30px;
    flex-shrink: 0; 
}

.settings-toggle-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    z-index: -1; 
}

.settings-toggle-label {
    position: absolute;
    inset: 0;
    background-color: var(--trans-text-light);
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.settings-toggle-label:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: var(--background-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

input[type="checkbox"]:checked + .settings-toggle-label {
    background-color: var(--button-color);
}

input[type="checkbox"]:checked + .settings-toggle-label:before {
    transform: translateX(30px);
}

input[type="checkbox"]:disabled + .settings-toggle-label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Buttons */
.settings-ar-button,
.settings-reset-button {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
}

.settings-reset-button {
    background-color: var(--button-alt-color);
}

.settings-ar-button:hover:not(:disabled),
.settings-reset-button:hover {
    background-color: var(--button-hover-color);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.settings-reset-button:hover {
    background-color: var(--button-alt-hover-color);
}

.settings-ar-button:disabled {
    background-color: var(--trans-text-light);
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.settings-ar-button.loading {
    color: transparent;
    position: relative;
}

.settings-ar-button.loading::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--title-color);
    border-radius: 50%;
    border-right-color: transparent;
    animation: button-loading 0.8s linear infinite;
}

@keyframes button-loading {
    to { transform: rotate(360deg); }
}

/* Focus States */
.settings-ar-button:focus-visible,
.settings-reset-button:focus-visible,
.settings-close-btn:focus-visible,
.settings-slider:focus-visible {
    outline: 2px solid var(--button-color);
    outline-offset: 2px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {

    .settings-ar-button,
    .settings-reset-button {
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
    }
}

/* Cache Management Styles */
.cache-buttons-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.settings-cache-button,
.settings-clear-button {
    flex: 1;
    min-width: 120px;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
}

.settings-cache-button {
    background-color: var(--button-color);
    color: var(--title-color);
}

.settings-clear-button {
    background-color: #dc3545;
    color: white;
}

.settings-cache-button:hover,
.settings-clear-button:hover {
    transform: translateY(-1px);
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.15);
}

.settings-cache-button:hover {
    background-color: var(--button-hover-color);
}

.settings-clear-button:hover {
    background-color: #c82333;
}

.settings-cache-button:active,
.settings-clear-button:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .cache-buttons-container {
        flex-direction: column;
    }
    
    .settings-cache-button,
    .settings-clear-button {
        min-width: unset;
    }
}

.ai-settings-group input {
    width: 100%;
}

/* Collapsible */
.settings-collapsible {
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    margin: 1rem 0;
}
.collapsible-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    cursor:pointer;
    padding:0.5rem 0.75rem;
    user-select:none;
}
.collapsible-header:hover { background: rgba(255,255,255,0.05); }
.chevron-icon { width:16px; height:16px; transition:transform 0.3s; }
.collapsible-header.open .chevron-icon { transform:rotate(90deg); }
.collapsible-content { overflow:hidden; max-height:0; transition:max-height 0.35s ease; padding:0 0.75rem; }
.collapsible-content.open { /* JS will set max-height */ padding:0.5rem 0.75rem 0.75rem; }
.ai-settings-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap:0.75rem 1rem; }
#cpm-media-container {
    margin-bottom: 24px;
    background-color: var(--submit-area-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(172, 65, 65, 0.1);
    transition: flex 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    max-height: 100%; 
}

#cpm-media-container img {
    width: 100%;
    height: 40vh;
    object-fit: contain;
    border-radius: 8px 8px 0 0;
    background-color: transparent;
}

#cpm-media-container video {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/*/ subtitles */
#cpm-media-container video::cue {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.8);
    font-size: 22px;
    font-weight: 600;
}

#cpm-media-container iframe {
    width: 100%;
    height: 60vh;
    border-radius: 8px 8px 0 0;
}

#cpm-text-content {
    margin-bottom: 0px;
    font-size: 16px;
    line-height: 1.6;
    flex: 1 1 auto;}

#cpm-text-content p {
    margin-bottom: 16px;
}

#cpm-text-content ul, #cpm-text-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

#cpm-text-content li {
    margin-bottom: 8px;
}

/* Scrollbar Styling */
#cpm-text-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
#cpm-text-content::-webkit-scrollbar-track {
background-color: var(--submit-area-color);
border-radius: 4px;
}

#cpm-text-content::-webkit-scrollbar-thumb {
background-color: var(--trans-text-light);
border-radius: 4px;
border: 2px solid var(--background-color);
}

#cpm-text-content::-webkit-scrollbar-thumb:hover {
background-color: var(--trans-text-strong);
}

#cpm-header-buttons {

    justify-content: flex-end;

    width: fit-content;
    margin-left: auto;
    margin-right: 0;
}

.cpm-button-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
}


.cpm-button {
    padding: 12px 24px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    width: 40%;
    word-wrap: break-word;
}

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

.cpm-button-alt {
    background-color: var(--button-alt-color);
}

.cpm-button-alt:hover {
    background-color: var(--button-alt-hover-color);
}

/* Input textarea styling */
.cpm-textarea-container {
    position: relative;
    width: 100%;
    margin: 1rem 0;
}

.cpm-textarea-field {
    width: 100%;
    min-height: 20vh;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #fff;
    resize: vertical;
    transition: all 0.2s ease-in-out;
}

.cpm-textarea-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cpm-textarea-field::placeholder {
    color: #94a3b8;
}

.cpm-textarea-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 14px;
    font-weight: 500;
    color: #b7b7b7;
}

.cpm-char-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 12px;
    color: #64748b;
}

/* Class to define layout properties for the media container when showing a PDF */
.cpm-media-pdf-mode {
  display: block !important;
  flex-grow: 1 !important; /* Allow it to take space in popup-body */
  flex-shrink: 1 !important;
  height: 400px !important; /* User-defined working height */
  margin-bottom: 20px !important; /* User-defined working margin */
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important; /* Crucial for controls/loading inside child */
}

/* =========================================
   MEDIA-ONLY OVERRIDES
   ========================================= */

/* When the popup has 'style-media-only', it means there's only media and no text/headline/buttons. 
   We expand the popup to nearly fill the screen, letting media occupy all the space. */

   /* Hide the header */
  .popup-base.style-media-only .popup-header {
    display: none;
  }

   .popup-base.style-media-only .popup-content {
    /* Expand the popup to a large portion of the screen */
    border-radius: 0; /* remove if you don't want corners squared off */
    max-height: 100%; /* fill the screen */
  }

  .popup-base.style-media-only #close-content-popup {
    /* Hide the close button */
    display: none;
  }

  /* Hide scrollbar in media-only mode */
  .popup-base.style-media-only #cpm-media-container {
    overflow: hidden;
}

  
  /* Hide the headline if it's "media only" */
  .popup-base.style-media-only .popup-header h2 {
    display: none !important;
  }
  
  /* We still keep the close button visible, but you can float it if desired */
  .popup-base.style-media-only .popup-header {
    background-color: transparent;
    border-bottom: none;
    display: flex;
    justify-content: flex-end;
  }
  
  /* Remove padding from the body so media can occupy full height */
  .popup-base.style-media-only .popup-body {
    padding: 0 !important;
    display: flex;
    flex: 1 1 auto;
  }
  
  /* Make the media container fill the rest */
  .popup-base.style-media-only #cpm-media-container {
    flex: 1 1 auto;
    margin: 0;
    width: 100%;
    height: 100%;
  }
  
  /* Force the media elements to fill their container (with object-fit as needed) */
  .popup-base.style-media-only #cpm-media-container img,
  .popup-base.style-media-only #cpm-media-container video,
  .popup-base.style-media-only #cpm-media-container iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain; /* or cover, if you prefer cropping */
  }
  
  /* Hide text content container entirely in media-only mode */
  .popup-base.style-media-only #cpm-text-content {
    display: none !important;
  }
  
  .popup-base.style-media-only #cpm-button-container {
    display: none !important;
  }


  /* =========================================
   MOBILE STYLES
   ========================================= */

   @media screen and (max-width: 768px) {
    /* Buttons */
    .cpm-button {
        padding: 12px 16px;
        font-size: 14px;
        width: 90%;
        word-wrap: break-word;
    }

    /* Text content */
    .popup-base.style-minimal #cpm-text-content {
        font-size: 12px
    }

    /* Subtitles */
    #cpm-media-container video::cue {
        font-size: 14px;
    }
  }

  



  

/* EditContentPopupManager.css */

/* --------------------------------------------------
   1. BASE & RESET STYLES
-------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  font-smooth: always; /* Note: font-smooth is non-standard, consider -webkit-font-smoothing: antialiased; and -moz-osx-font-smoothing: grayscale; for broader support */
}

/* --------------------------------------------------
   2. POPUP LAYOUT
      - Includes .popup-base, .popup-overlay, .popup-content from your base HTML structure
      - Also .popup-header, #ecpm-object-name-placeholder, .header-buttons, #close-edit-popup
      - And .ecpm-popup-body
-------------------------------------------------- */

.ecpm-popup-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Allows scrolling for content that exceeds popup height */
  background-color: transparent; /* Assuming main popup background is set elsewhere */
  padding: 0; /* Body itself has no padding, form inside will have it */
  animation: fadeInPopup 0.3s ease;
  max-height: 70vh; /* Example: constrain height and make scrollable */
}

@keyframes fadeInPopup {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------
   3. GENERAL FORM STYLING
      - #edit-content-form
      - .ecpm-form-group & labels
      - General input, textarea, select styling
-------------------------------------------------- */
#edit-content-form {
  width: 100%;
  margin: 0;
  padding: 20px; /* Uniform padding for the form content */
}

.ecpm-form-group {
  margin-bottom: 15px; /* Consistent spacing */
}

.ecpm-form-group label {
  display: block;
  margin-bottom: 6px; /* Slightly reduced margin */
  color: #bbbbbb;
  font-size: 14px;
  font-weight: 500;
}

.ecpm-form-group input[type="text"],
.ecpm-form-group input[type="url"],
.ecpm-form-group textarea,
.ecpm-form-group select {
  width: 100%;
  padding: 10px 12px; /* Adjusted padding */
  border: 1px solid #444;
  border-radius: 5px; /* Slightly softer radius */
  background-color: #1a1a1aa9; /* Darker, slightly transparent */
  color: #ffffff;
  font-size: 14px;
  line-height: 1.5;
  transition: background-color 0.2s, border-color 0.2s;
}

.ecpm-form-group input[type="text"]:focus,
.ecpm-form-group input[type="url"]:focus,
.ecpm-form-group textarea:focus,
.ecpm-form-group select:focus {
  outline: none;
  background-color: #222222; /* Slightly lighter on focus */
  border-color: #007bff; /* Highlight focus */
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25); /* Subtle focus glow */
}

.ecpm-form-group textarea {
  resize: vertical;
  min-height: 100px;
  /* Custom scrollbar for textarea already defined below in section 6 */
}

/* --------------------------------------------------
   4. SPECIFIC COMPONENT STYLING
-------------------------------------------------- */

/* 4.1. SUBMIT BUTTON (SAVE CHANGES) */
.ecpm-submit-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px; /* Adjusted padding */
  background-color: #28a745;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-size: 15px; /* Slightly adjusted font size */
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.1s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.ecpm-submit-btn:hover:not(.ecpm-submit-btn-disabled) {
  background-color: #218838;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}
.ecpm-submit-btn:active:not(.ecpm-submit-btn-disabled) {
  background-color: #1e7e34;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateY(0px);
}
.ecpm-submit-btn-disabled {
  background-color: #5a5a5a; /* More distinct disabled background */
  color: #999999;
  opacity: 0.7; /* Use opacity and explicit color change */
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.ecpm-save-icon {
  stroke: currentColor; /* Use current color for icon */
  width: 18px; /* Adjusted size */
  height: 18px;
}

/* 4.2. MEDIA ASSET INPUT & BROWSE BUTTON */
/* Styles for #browse-media-assets-btn that made it full width are removed. */
/* Styles for .ecpm-media-button-group and its children are removed as the group no longer exists. */

/* New styles for the media asset details block */
.ecpm-asset-controls .ecpm-media-asset-details {
  display: flex;
  flex-direction: column; /* Stack details vertically */
  gap: 4px; /* Small gap between detail lines */
  margin-bottom: 8px; /* Space before the browse/clear buttons */
  font-size: 13px; /* Slightly smaller font for details */
  width: 100%; /* Take full width */
}

.ecpm-asset-controls .ecpm-media-asset-details > div { /* Each line of detail */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Add ellipsis if text is too long */
}

.ecpm-asset-controls .ecpm-media-asset-details .ecpm-current-asset-id {
  font-weight: bold; /* Make the main ID/Name bold */
  color: #e0e0e0; /* Brighter color for the main ID/Name */
}

.ecpm-asset-controls .ecpm-media-asset-details .ecpm-media-asset-info-bit {
  color: #b0b0b0; /* Softer color for secondary info like type/description */
}

/* 4.3. MODEL/TEXTURE ASSET CONTROLS */
/* .ecpm-asset-controls and its children styles are recently added. Integrating them here. */
.ecpm-asset-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 10px;
  padding: 10px 12px;
  background-color: #1a1a1aa9;
  border: 1px solid #444;
  border-radius: 5px;
  margin-top: 4px;
}
.ecpm-asset-controls .ecpm-current-asset-id {
  color: #cccccc; /* Lighter color for current asset ID */
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1; /* Allow it to take available space */
  min-width: 80px; /* Prevent it from becoming too small */
}
.ecpm-asset-controls .ecpm-browse-btn,
.ecpm-asset-controls .ecpm-clear-btn {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #555;
  background-color: #333;
  color: #e0e0e0;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.ecpm-asset-controls .ecpm-browse-btn:hover,
.ecpm-asset-controls .ecpm-clear-btn:hover {
  background-color: #404040;
  border-color: #666;
  transform: translateY(-1px);
}
.ecpm-asset-controls .ecpm-clear-btn {
  background-color: #523030; /* Darker red for clear */
  border-color: #704545;
}
.ecpm-asset-controls .ecpm-clear-btn:hover {
  background-color: #6b3e3e;
  border-color: #8a5a5a;
}

/* 4.4. DYNAMICALLY ADDED BUTTONS SECTION */
#ecpm-buttons-container {
  margin-top: 20px; /* Add some space above this section */
}
.ecpm-add-button {
  background-color: #28a745;
  border: none;
  color: white;
  padding: 8px 12px; /* Slightly smaller padding */
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  font-size: 18px; /* For the '+' icon */
  line-height: 1;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin-bottom: 15px; /* Space after the add button */
  float: right; /* Position to the right of the label */
}
.ecpm-add-button:hover {
  background-color: #218838;
  transform: translateY(-1px);
}
#ecpm-buttons-list {
  clear: both; /* Clear the float from add button */
}
.ecpm-button-row {
  display: flex;
  flex-direction: column;
  background-color: #222222; /* Slightly lighter background for rows */
  padding: 15px;
  margin-bottom: 12px;
  border-radius: 6px;
  gap: 10px;
  border: 1px solid #383838; /* Subtle border for rows */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.ecpm-button-row-first {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ecpm-button-name-label { /* This class was in JS but not styled, now styling for consistency */
  font-size: 13px;
  color: #c0c0c0;
  font-weight: 500;
}
.ecpm-button-row input[type="text"].ecpm-button-name, /* More specific selector */
.ecpm-button-row input[type="text"].ecpm-button-event {
  width: 100%;
  background-color: #2c2c2c; /* Input background inside button rows */
  border: 1px solid #4a4a4a;
  color: #fff;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 14px;
}
.ecpm-button-row input[type="text"].ecpm-button-name:focus,
.ecpm-button-row input[type="text"].ecpm-button-event:focus {
  border-color: #007bff;
  background-color: #333333;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}
.ecpm-remove-button {
  background-color: transparent;
  border: 1px solid #663333;
  color: #ff6666; /* Lighter red for better visibility */
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.ecpm-remove-button:hover {
  background-color: #663333;
  color: #fff;
  transform: scale(1.05);
}
.ecpm-chain-btn {
  padding: 8px 15px;
  background-color: #3a3a3a;
  width: 100%;
  color: #e0e0e0;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.ecpm-chain-btn:hover {
  background-color: #454545;
  transform: translateY(-1px);
}

/* 4.5. EVENT CHAIN EDITOR */
.ecpm-eventchain-editor {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background-color: #282828; /* Slightly different background for editor */
  border: 1px solid #404040;
  border-radius: 5px;
  /* .hidden class handles visibility */
}

/* --------------------------------------------------
   5. UTILITY CLASSES
-------------------------------------------------- */
.hidden {
  display: none !important;
}
/* .ecpm-eventchain-editor.hidden is handled by the above .hidden */

/* --------------------------------------------------
   6. SCROLLBAR STYLING (For popup body and textareas)
-------------------------------------------------- */
.ecpm-popup-body::-webkit-scrollbar,
.ecpm-form-group textarea::-webkit-scrollbar {
  width: 8px; /* Slimmer scrollbar */
}
.ecpm-popup-body::-webkit-scrollbar-track,
.ecpm-form-group textarea::-webkit-scrollbar-track {
  background-color: #202020; /* Darker track */
  border-radius: 4px;
}
.ecpm-popup-body::-webkit-scrollbar-thumb,
.ecpm-form-group textarea::-webkit-scrollbar-thumb {
  background-color: #444; /* Subdued thumb color */
  border-radius: 4px;
  border: 1px solid #202020; /* Border to match track */
}
.ecpm-popup-body::-webkit-scrollbar-thumb:hover,
.ecpm-form-group textarea::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}
/* For Firefox */
.ecpm-form-group textarea {
  scrollbar-width: thin;
  scrollbar-color: #444 #202020;
}
.ecpm-popup-body {
  scrollbar-width: thin; /* Apply to popup body as well if desired */
  scrollbar-color: #444 #202020;
}


/* --------------------------------------------------
   7. MEDIA QUERIES / RESPONSIVE DESIGN
-------------------------------------------------- */
@media (max-width: 600px) { /* Adjusted breakpoint for more general mobile */
  #edit-content-form {
    padding: 15px; /* Reduce padding on smaller screens */
  }

  .ecpm-submit-btn {
    padding: 10px 15px;
    font-size: 14px;
  }
  .ecpm-save-icon {
    width: 16px;
    height: 16px;
  }

  /* Asset controls: Ensure buttons stack or wrap nicely */
  .ecpm-asset-controls {
    flex-direction: column; /* Stack items vertically */
    align-items: stretch; /* Make items take full width */
  }
  .ecpm-asset-controls .ecpm-current-asset-id {
    text-align: center; /* Center the current asset ID text */
    margin-bottom: 8px; /* Add space below it when stacked */
  }
  .ecpm-asset-controls .ecpm-browse-btn,
  .ecpm-asset-controls .ecpm-clear-btn {
    width: 100%; /* Make buttons full width */
    margin-bottom: 5px; /* Space between stacked buttons */
  }
  .ecpm-asset-controls .ecpm-clear-btn:last-child {
    margin-bottom: 0; /* No margin for the last button */
  }
  
  .ecpm-popup-body {
    max-height: 80vh; /* Allow more height on mobile if needed */
  }
}

@media (max-width: 480px) {
  /* Styles from the previous 480px breakpoint are now either integrated above 
     or covered by the 600px breakpoint. Add specific 480px overrides if needed. */

  .ecpm-button-row {
    /* flex-direction: column; and align-items: stretch; are already default */
  }
  .ecpm-button-row input[type="text"].ecpm-button-name,
  .ecpm-button-row input[type="text"].ecpm-button-event,
  .ecpm-remove-button, /* Already full width due to parent flex settings or specific rules */
  .ecpm-chain-btn {
    width: 100%; /* Ensure full width for these items if not already covered */
  }
  .ecpm-remove-button {
    margin-top: 8px; /* Space if it stacks below something */
  }
  .ecpm-add-button {
    padding: 10px; /* Slightly larger tap target */
    font-size: 20px;
    margin-left: auto; /* Push to right if not full width */
    margin-right: 0; 
    float: none; /* Override float if not behaving well with flex */
    display: block; /* Or inline-block depending on desired layout */
    margin-bottom: 10px;
  }
  #ecpm-buttons-container > label { /* Ensure label and add button are on same effective line or stack nicely */
      display: inline-block; /* Allow add button next to it if space */
      margin-bottom: 10px;
  }
}

/* Removed .ecpm-dropzone and related classes as they are no longer used:
   - .ecpm-dropzone
   - .ecpm-dropzone label (if it was specific to dropzone)
   - .ecpm-dropzone-area
   - .ecpm-dropzone-area:hover
   - .ecpm-dropzone-area.highlight
   - .ecpm-dropzone-content
   - .ecpm-dropzone-area .ecpm-upload-icon
   - .ecpm-dropzone-area p
   - .ecpm-upload-link
   - .ecpm-file-label
   - .ecpm-dropzone-area input[type="file"] (already display:none)
   - .ecpm-dropzone-actions
   - .ecpm-dropzone-actions button
   - .ecpm-dropzone-actions button:hover
   - .ecpm-dropzone-actions .ecpm-clear-btn:hover (if specific to dropzone clear)
*/

/* loginPopupManager.css */

.lp-login-section {
    display: none; /* Hide all sections by default */
    margin-bottom: 20px;
}

.lp-description {
    margin-bottom: 20px;
    color: var(--trans-text-strong);
    font-size: 16px;
}

.lp-input-group {
    position: relative;
    margin-bottom: 25px;
    display: flex;
}

.lp-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    font-size: 16px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.lp-input:focus {
    outline: none;
    border-color: var(--button-color);
}

.lp-input-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--trans-text-strong);
    pointer-events: none;
    transition: all 0.3s ease;
}

.lp-input:focus + .lp-input-label,
.lp-input:not(:placeholder-shown) + .lp-input-label {
    top: -10px;
    left: 10px;
    font-size: 14px;
    background-color: var(--background-color);
    padding: 0 5px;
    color: var(--button-color);
}

.lp-button {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.lp-button:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
}

.lp-button-secondary {
    background-color: var(--button-alt-color);
    margin-top: 15px;
}

.lp-button-secondary:hover {
    background-color: var(--button-alt-hover-color);
}

#logged-in-username {
    font-weight: bold;
    color: var(--button-color);
}

.avatar-description {
    margin-bottom: 25px;
    color: var(--trans-text-strong);
    font-size: 16px;
    text-align: center;
    max-width: 400px;
    align-self: center;
}

.avatar-selection-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 5px;
    width: 100%;
    max-width: 500px;
    padding: 10px;
    align-self: center;
}

.avatar-button {
    position: relative;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.3s ease;
    aspect-ratio: 1;
    background: none;
}

.avatar-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Hover Effects */
.avatar-button:hover {
    transform: translateY(-2px);
    border-color: var(--button-color);
}

.avatar-button:hover img {
    transform: scale(1.05);
}

/* Focus States */
.avatar-button:focus {
    outline: none;
    border-color: var(--button-color);
    box-shadow: 0 0 0 3px var(--button-color-transparent);
}

.avatar-button:focus:not(:focus-visible) {
    box-shadow: none;
}

/* Active/Selected State */
.avatar-button:active {
    transform: translateY(1px);
}

/* Selection Indicator */
.avatar-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--button-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-button:hover::after {
    opacity: 0.1;
}

.avatar-button.selected::after {
    opacity: 0.2;
}

/* Loading State */
.avatar-button.loading {
    cursor: wait;
    opacity: 0.7;
}


/* Animation Keyframes */
@keyframes avatarAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .avatar-popup-body {
        padding: 20px;
    }

    .avatar-selection-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }

    .avatar-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
}
/*
  ============================================================================
  Base Container & Visibility
  ============================================================================
*/
.ss-container {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background-color: rgb(47, 47, 47);
  color: var(--text-color);
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 997;
}

.ss-container.ss-visible {
  opacity: 1;
  pointer-events: auto;
}

/*
  ============================================================================
  Header
  ============================================================================
*/
.ss-header {
  height: 56px;
  background-color: rgba(0, 0, 0, 0.1);
  /*a nice an prounounced shadow*/
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  justify-content: space-between;
  flex-shrink: 0;
}

.ss-header-left {
  display: flex;
  align-items: center;
}

.ss-header-logo {
  height: 32px;
  margin-right: 0.5rem;
}

.ss-header-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--title-color);
}

.ss-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hamburger icon */
.ss-header-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: none; /* hidden on desktop, shown on mobile */
  color: var(--text-color);
}

/*
  ============================================================================
  Overlay
  ============================================================================
*/
.ss-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}
.ss-overlay.ss-overlay-show {
  display: block;
  pointer-events: auto;
  opacity: 1;
}

/*
  ============================================================================
  Content Wrapper
  ============================================================================
*/
.ss-content-wrapper {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

/*
  ============================================================================
  Sidebar
  ============================================================================
*/
.ss-sidebar {
  width: 200px;
  background-color: rgb(53, 53, 53);
  flex-shrink: 0;
  transition: transform 0.3s ease;
  overflow-y: auto;
  position: relative;
}

.ss-sidebar.ss-sidebar-open {
  transform: translateX(0);
}

.ss-search-wrapper {
  padding: 1rem;
}

.ss-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--trans-text-light);
  border-radius: 4px;
  background-color: var(--submit-area-color);
  color: var(--text-color);
}

.ss-sort-wrapper {
  padding: 0.5rem 1rem;
}

.ss-sort-select {
  width: 100%;
  padding: 0.4rem;
  border-radius: 4px;
  background-color: var(--submit-area-color);
  color: var(--text-color);
  border: 1px solid var(--trans-text-light);
}

.ss-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ss-category-item {
  padding: 0.75rem 1rem;
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  color: var(--text-color);
}

.ss-category-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.ss-category-item.active {
  background-color: rgba(76, 175, 80, 0.2);
  border-left-color: var(--button-color);
  font-weight: 600;
}


/* Off-canvas on smaller screens */
@media (max-width: 992px) {
  .ss-header-toggle {
    display: block;
  }
  .ss-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 11;
  }
}

/*
  ============================================================================
  Main / Grid
  ============================================================================
*/
.ss-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.ss-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1rem;
  overflow-y: auto;
}

/* Scrollbar styling */
.ss-grid::-webkit-scrollbar,
.ss-sidebar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.ss-grid::-webkit-scrollbar-track,
.ss-sidebar::-webkit-scrollbar-track {
  background-color: var(--submit-area-color);
  border-radius: 4px;
}

.ss-grid::-webkit-scrollbar-thumb,
.ss-sidebar::-webkit-scrollbar-thumb {
  background-color: var(--trans-text-light);
  border-radius: 4px;
  border: 2px solid var(--background-color);
}

.ss-grid::-webkit-scrollbar-thumb:hover,
.ss-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: var(--trans-text-strong);
}

/* Empty state */
.ss-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--trans-text-strong);
}

/*
  ============================================================================
  Cards
  ============================================================================
*/
.ss-card {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;


  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden; /* keep badges and overlays clipped */
}

.ss-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.ss-card-thumb {
  width: 100%;
  height: 160px;
  background-position: center center;
  background-size: cover;
  position: relative;
}

/* Players online badge on card thumbnail */
.ss-presence-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--title-color);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
}

.ss-featured-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--button-color);
  color: var(--title-color);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
}

.ss-card-body {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ss-card-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--title-color);
}

.ss-card-desc {
  flex: 1;
  font-size: 0.85rem;
  word-wrap: break-word;
  margin: 0 0 0.5rem;
  line-height: 1.4;
  color: var(--text-color);
  opacity: 0.9;
}

.ss-details-btn {
  background-color: var(--button-color);
  color: var(--title-color);
  border: none;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 0.85rem;
}

.ss-details-btn:hover {
  background-color: var(--button-hover-color);
}

/*
  ============================================================================
  Detail Panel
  ============================================================================
*/
.ss-detail-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100%;
  background-color: rgb(12, 12, 12);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease;
  z-index: 10000;
  display: flex;
  flex-direction: column;
}

.ss-detail-panel.open {
  right: 0;
}

.ss-detail-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem;
  align-self: flex-end;
  color: var(--text-color);
}

.ss-detail-close:hover {
  color: var(--button-color);
}

.ss-detail-thumb {
  height: 220px;
  background-position: center center;
  background-size: cover;
}

.ss-detail-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Multiplayer section inside the scene detail panel */
.ss-detail-multiplayer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ss-detail-multiplayer h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  color: var(--title-color);
}

.ss-join-name-group {
  margin-bottom: 0.75rem;
}

.ss-join-name-group input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--trans-text-light);
  background: var(--submit-area-color);
  color: var(--text-color);
}

.ss-join-name-group input[type="text"]::placeholder {
  color: var(--trans-text-light);
}

.ss-join-name-group input[type="text"]:focus {
  outline: 2px solid var(--button-color);
  outline-offset: 0;
  border-color: var(--button-color);
}

.ss-active-rooms {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ss-room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ss-room-info {
  color: var(--text-color);
  font-size: 0.9rem;
}

.ss-room-join-btn {
  background-color: var(--button-color);
  color: var(--title-color);
  border: none;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.05s ease;
}

.ss-room-join-btn:hover {
  background-color: var(--button-hover-color);
}

.ss-room-join-btn:active {
  transform: translateY(1px);
}

.ss-no-rooms {
  color: var(--trans-text-strong);
  font-size: 0.9rem;
}

.ss-detail-content h2 {
  margin: 0.5rem 0;
  font-size: 1.4rem;
  color: var(--title-color);
}

.ss-detail-desc {
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-color);
}

.ss-detail-enter {
  background-color: var(--button-color);
  color: var(--title-color);
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ss-detail-enter:hover {
  background-color: var(--button-hover-color);
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .ss-sidebar {
    width: 240px;
  }

  .ss-detail-panel {
    width: 70%;
    right: -100%;
  }
  .ss-detail-panel.open {
    right: 0;
  }
  .ss-detail-thumb {
    height: 180px;
  }
  .ss-card {
    min-height: 150px;
  }

  .ss-card-thumb {
    min-height: 20px;
  }
}
/* FRONTEND/src/css/assetBrowserModal.css */

/* Container overrides */
.asset-browser-modal-container {
    z-index: 1200;
}

.asset-browser-modal-container,
.asset-browser-modal-container.active {
    pointer-events: none; /* Let content handle interaction */
}

.abp-popup-content {
    padding: 0;
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
}

/* Inherit header styles from popupBase.css */
.abp-popup-content .popup-header {
    border-bottom: 1px solid var(--border-color, #444);
    padding: 15px 20px;
}

.abp-popup-body {
    overflow-y: auto;
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column; /* Allow body to manage layout */
}

.abp-description {
    margin-bottom: 15px;
    font-size: var(--font-size-small, 14px);
    color: var(--text-secondary-color, #b0b0b0);
}

/* Combined Header Controls Area */
.abp-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.abp-filter-container {
    margin-bottom: 0; /* Reset margin as it's inside flex container */
    display: flex;
    align-items: center;
    gap: 10px;
}

.abp-filter-container label {
    font-size: var(--font-size-small, 14px);
    font-weight: 500;
    color: var(--text-secondary-color, #b0b0b0);
}

#abp-type-filter {
    padding: 8px 12px;
    border-radius: var(--input-border-radius, 5px);
    border: 1px solid var(--input-border-color, #555);
    background-color: var(--input-bg-color, #3a3a3c);
    color: var(--text-color, #e0e0e0);
    font-size: var(--font-size-small, 14px);
    min-width: 200px;
}

/* Upload Trigger Button Style */
.abp-button.abp-upload-trigger-btn {
    padding: 8px 15px;
    background-color: var(--button-secondary-bg, #555);
    color: var(--button-secondary-text, white);
    border: none;
    border-radius: var(--button-border-radius, 5px);
    cursor: pointer;
    font-size: var(--font-size-small, 14px);
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
    white-space: nowrap;
}

.abp-button.abp-upload-trigger-btn:hover:not(:disabled) {
    background-color: var(--button-secondary-hover-bg, #666);
    transform: translateY(-1px);
}

.abp-button.abp-upload-trigger-btn:disabled {
    background-color: var(--button-disabled-bg, #444); /* Darker disabled state */
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

/* New: Storage Usage Info Styles */
.abp-storage-usage-info {
    padding: 8px 0px 15px 0px; /* Padding around the text */
    font-size: var(--font-size-small, 13px);
    text-align: left; /* Align to the left, subtle */
    border-bottom: 1px solid var(--border-color, #444);
    margin-bottom: 15px;
}

.abp-storage-usage-info .abp-storage-label {
    color: var(--text-secondary-color, #b0b0b0);
}

.abp-storage-usage-info .abp-storage-values {
    font-weight: 600;
    color: var(--text-color, #e0e0e0);
}

/* Optional: Color coding for text based on usage if desired */
.abp-storage-usage-info.storage-low .abp-storage-values {
    color: var(--color-success, #28a745); /* Or a subtle green */
}
.abp-storage-usage-info.storage-medium .abp-storage-values {
    color: var(--color-warning, #ffc107); /* Or a subtle yellow/orange */
}
.abp-storage-usage-info.storage-high .abp-storage-values {
    color: var(--color-error, #dc3545); /* Or a subtle red */
}
.abp-storage-usage-info.storage-error .abp-storage-values {
    color: var(--color-error, #dc3545);
}

/* Search Bar Styles */
.abp-search-container {
    margin-bottom: 15px; /* Space below the search bar */
}

#abp-search-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: var(--input-border-radius, 5px);
    border: 1px solid var(--input-border-color, #555);
    background-color: var(--input-bg-color, #3a3a3c);
    color: var(--text-color, #e0e0e0);
    font-size: var(--font-size-small, 14px);
    box-sizing: border-box; /* Ensures padding doesn't add to width */
}

#abp-search-input::placeholder {
    color: var(--text-secondary-color, #b0b0b0);
    opacity: 0.7;
}


.abp-list {
    list-style: none;
    padding: 0;
    margin: 0;

    flex-grow: 1; 
    overflow-y: auto; 
}

.abp-list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color, #444);
    transition: background-color 0.2s ease;
}

.abp-list-item:hover {
    background-color: var(--hover-bg-color, rgba(255, 255, 255, 0.05));
}

.abp-list-item:last-child {
    border-bottom: none;
}

.abp-asset-preview-image {
    grid-column: 1 / 2;
    width: 60px;
    height: 45px;
    border-radius: var(--image-border-radius, 4px);
    border: 1px solid var(--border-color-light, #555);
    object-fit: cover;
    background-color: var(--input-bg-color, #333);
}

.abp-asset-info {
    grid-column: 2 / 3;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.abp-asset-name {
    font-weight: 600;
    font-size: var(--font-size-medium, 15px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-highlight-color, #fff);
}

.abp-asset-type,
.abp-asset-size {
    font-size: var(--font-size-extra-small, 11px);
    color: var(--text-tertiary-color, #888);
    margin-left: 8px;
    font-weight: 400;
}

.abp-asset-description {
    font-size: var(--font-size-extra-small, 12px);
    color: var(--text-secondary-color, #b0b0b0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abp-asset-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 3 / 4;
}

.abp-select-button {
    padding: 8px 15px;
    background-color: var(--button-primary-bg, #007bff);
    color: var(--button-primary-text, white);
    border: none;
    border-radius: var(--button-border-radius, 5px);
    cursor: pointer;
    font-size: var(--font-size-small, 14px);
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.abp-select-button:hover {
    background-color: var(--button-primary-hover-bg, #0056b3);
    transform: translateY(-1px);
}

.abp-delete-button {
    padding: 6px 8px;
    background-color: transparent;
    color: var(--button-danger-text, #ff4d4d);
    border: 1px solid transparent;
    border-radius: var(--button-border-radius, 5px);
    cursor: pointer;
    font-size: var(--font-size-medium, 16px);
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.abp-delete-button:hover {
    background-color: var(--button-danger-hover-bg, rgba(255, 77, 77, 0.1));
    color: var(--button-danger-hover-text, #ff1a1a);
    border-color: var(--button-danger-hover-border, rgba(255, 77, 77, 0.5));
}

#abp-loading-state {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-secondary-color, #a0a0a0);
}

.abp-list-item-empty,
.abp-list-item-error {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-secondary-color, #a0a0a0);
    font-style: italic;
}

/* Scrollbar styling */
.abp-popup-body::-webkit-scrollbar,
.abp-list::-webkit-scrollbar {
    width: 8px;
}

.abp-popup-body::-webkit-scrollbar-track,
.abp-list::-webkit-scrollbar-track {
    background: var(--scrollbar-track-bg, rgba(0,0,0,0.1));
    border-radius: 4px;
}

.abp-popup-body::-webkit-scrollbar-thumb,
.abp-list::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-bg, #555);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.abp-popup-body::-webkit-scrollbar-thumb:hover,
.abp-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover-bg, #777);
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .abp-popup-content {
        max-width: var(--popup-max-width-mobile, 95%);
    }
    
    .abp-popup-body {
         padding: 15px;
    }

    .abp-filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    #abp-type-filter {
        min-width: auto;
    }

    .abp-list-item {
        grid-template-columns: auto 1fr;
        gap: 10px;
        align-items: flex-start;
    }
    
    .abp-asset-info {
        grid-column: 2 / 3;
        margin-right: 0;
    }

    .abp-asset-actions {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        justify-self: stretch;
        margin-top: 8px;
    }

    .abp-select-button {
        padding: 10px 15px;
    }
    
     .abp-asset-preview-image {
        width: 50px;
        height: 37.5px;
    }
} 

.abp-public-checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: var(--font-size-small, 13px);
    color: var(--text-secondary-color, #b0b0b0);
}

.abp-public-checkbox {
    margin: 0;
    cursor: pointer;
}

.abp-public-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.abp-public-label {
    user-select: none;
}

.abp-public-indicator {
    font-size: var(--font-size-small, 14px);
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.abp-public-indicator.public {
    color: var(--success-color, #28a745);
    background-color: var(--success-bg-subtle, rgba(40, 167, 69, 0.1));
}

.abp-public-indicator.private {
    color: var(--warning-color, #ffc107);
    background-color: var(--warning-bg-subtle, rgba(255, 193, 7, 0.1));
}

/* Edit Quiz button styles */
.abp-edit-quiz-button {
    padding: 6px 12px;
    background-color: var(--button-secondary-bg, #6c757d);
    color: var(--button-secondary-text, white);
    border: none;
    border-radius: var(--button-border-radius, 5px);
    cursor: pointer;
    font-size: var(--font-size-small, 13px);
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.abp-edit-quiz-button:hover {
    background-color: var(--button-secondary-hover-bg, #5a6268);
    transform: translateY(-1px);
}



/* FRONTEND/src/css/uploadAssetModal.css */

/* Container overrides */
.upload-asset-modal-container {
    z-index: 1200;
}

.upload-asset-modal-container,
.upload-asset-modal-container.active {
    pointer-events: none;
}

.uap-popup-content {
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
}

/* Inherit header styles */
.uap-popup-content .popup-header {
    border-bottom: 1px solid var(--border-color, #444);
    padding: 15px 20px;
}

.uap-popup-body {
    padding: 20px;
}

#upload-asset-form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Spacing between form groups */
}

#uap-description {
    margin-bottom: 10px;
    font-size: var(--font-size-small, 14px);
    color: var(--text-secondary-color, #b0b0b0);
}

.uap-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.uap-form-group label {
    font-size: var(--font-size-small, 13px);
    font-weight: 500;
    color: var(--text-secondary-color, #b0b0b0);
}

.uap-form-group input[type="text"],
.uap-form-group input[type="file"] {
    padding: 10px 12px;
    border-radius: var(--input-border-radius, 5px);
    border: 1px solid var(--input-border-color, #555);
    background-color: var(--input-bg-color, #3a3a3c);
    color: var(--text-color, #e0e0e0);
    font-size: var(--font-size-medium, 14px);
    width: 100%; 
    box-sizing: border-box;
}

.uap-form-group input[type="file"] {
    padding: 8px; /* Slightly less padding for file input */
}

.uap-form-group input[type="file"]::file-selector-button {
    padding: 6px 12px;
    margin-right: 10px;
    border: none;
    background-color: var(--button-secondary-bg, #555);
    color: var(--button-secondary-text, #fff);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.uap-form-group input[type="file"]::file-selector-button:hover {
    background-color: var(--button-secondary-hover-bg, #666);
}

.uap-button.uap-submit-btn {
    padding: 12px 20px; /* Larger button */
    margin-top: 10px;
    background-color: var(--button-confirm-bg, #4CAF50);
    color: var(--button-confirm-text, white);
    border: none;
    border-radius: var(--button-border-radius, 5px);
    cursor: pointer;
    font-size: var(--font-size-medium, 15px);
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.uap-button.uap-submit-btn:hover:not(:disabled) {
    background-color: var(--button-confirm-hover-bg, #45a049);
    transform: translateY(-1px);
}

.uap-button.uap-submit-btn:disabled {
    background-color: var(--button-disabled-bg, #555);
    cursor: not-allowed;
    opacity: 0.6;
}

.uap-upload-status {
    margin-top: 10px;
    font-size: var(--font-size-small, 13px);
    min-height: 1.2em; 
    text-align: center;
    color: var(--text-secondary-color, #b0b0b0);
}

/* New styles for storage usage info */
.uap-storage-usage-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color-light, #4f4f4f);
}

.uap-storage-label {
    font-size: var(--font-size-small, 13px);
    color: var(--text-secondary-color, #b0b0b0);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uap-storage-values {
    font-weight: 600;
    color: var(--text-color, #e0e0e0);
}

.uap-storage-progress-bar-container {
    width: 100%;
    height: 10px; /* Slimmer progress bar */
    background-color: var(--input-bg-color, #3a3a3c); /* Darker background for the track */
    border-radius: var(--border-radius-small, 3px);
    overflow: hidden;
    border: 1px solid var(--border-color, #555);
}

.uap-storage-progress-bar {
    height: 100%;
    /* background-color is set inline by JS */
    border-radius: var(--border-radius-small, 3px); /* Match container for smooth edges */
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out; /* Re-enabled */
    text-align: right;
    line-height: 10px; /* Match height */
    font-size: 8px; /* Very small text for percentage, if ever needed inside */
    color: white;
}

/* Responsive adjustments if needed */
@media screen and (max-width: 600px) {
    .uap-popup-content {
        max-width: var(--popup-max-width-mobile, 95%);
    }
    .uap-popup-body {
        padding: 15px;
    }
} 
/* adminDashboardManager.css */

.adm-popup-section {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Spacing between buttons */
    margin-bottom: 20px;
}

.adm-button {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-align: center;
}

.adm-button:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
}

/* Ensuring the popup content itself has some padding if not already handled by popup-base */
.admin-dashboard-popup-content .popup-body {
    padding-top: 20px; /* Add some space if header is minimal or not prominent */
} 

/* Add specific style for the quiz editor button if needed */
/* 
#admin-quiz-editor-btn {
    background-color: #some-other-color; 
}
*/ 
/* userFormModalManager.css */

/* New base container styles for userFormModal */
.user-form-modal-container {
    z-index: 1200;
}

.user-form-modal-container,
.user-form-modal-container.active {
    pointer-events: none; /* Container blocks scene, inner content handles clicks */
}

.ufm-modal-content {
    padding: 30px;
    width: 90%;
    max-width: 600px;
}

.ufm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.ufm-modal-header h3 {
    margin-top: 0;
    color: var(--title-color);
    font-size: 20px; /* Slightly smaller if it's a child modal title */
    margin-bottom: 0;
}

.ufm-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: color 0.2s ease;
}

.ufm-close-btn:hover {
    color: var(--button-color);
}

.ufm-form {
    display: flex;
    flex-direction: column;
}

.ufm-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ufm-input,
.ufm-select,
.ufm-textarea {
    margin-bottom: 20px;
    padding: 12px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    font-size: 16px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.ufm-input.ufm-half-width {
    flex-grow: 1;
    flex-basis: calc(50% - 7.5px); /* Account for gap */
}

.ufm-textarea {
    min-height: 80px;
    resize: vertical;
}

.ufm-input:focus,
.ufm-select:focus,
.ufm-textarea:focus {
    outline: none;
    border-color: var(--button-color);
}

.ufm-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px; /* Reduced from 30px to look tighter */
}

.ufm-button {
    padding: 10px 18px; /* Slightly smaller */
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px; /* Slightly smaller */
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.ufm-button:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-1px);
}

.ufm-delete-button {
    background-color: var(--button-remove-color);
}

.ufm-delete-button:hover {
    background-color: var(--button-remove-hover-color);
}

/* Hide delete button by default, show via JS */
#ufm-delete-user-btn {
    display: none;
} 
.notification {
    padding: 5px 10px;
    font-family: var(--primary-font);
    border-radius: 4px;
    color: white;
    background-color: #333;
    position: fixed;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.notification-flex-container {
    display: inline-flex;
    align-items: center; /* Aligns items vertically */
    justify-content: space-between; /* Distributes space between items */
    width: 100%; /* Ensure the container fills the notification width */
}

.notification-text {
    margin-right: 10px; /* Space between text and button */
}
/* micModalStyles.css */

/* Base Variables */
:root {
    --mic-modal-z-index: 9999;
    --mic-modal-padding: 30px;
    --mic-modal-border-radius: 12px;
    --mic-modal-transition-duration: 0.3s;
    --mic-modal-max-width: 500px;
    --mic-modal-bg-color: rgba(16, 16, 16, 0.95);
    --mic-modal-overlay-color: rgba(0, 0, 0, 0.5);
    --mic-modal-border-color: #cccccc;
    --mic-modal-header-bg: rgba(0, 0, 0, 0.6);
    --mic-modal-text-color: #ffffff;
    --mic-modal-button-bg: #007bff;
    --mic-modal-button-hover-bg: #0056b3;
    --mic-modal-button-text-color: #ffffff;
    --mic-modal-secondary-button-bg: #6c757d;
    --mic-modal-secondary-button-hover-bg: #5a6268;
}

.mic-modal-base {
    z-index: var(--mic-modal-z-index);
}

.mic-modal-base,
.mic-modal-base.active {
    pointer-events: auto;
}

/* Modal Overlay */
.mic-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--mic-modal-overlay-color);
}

/* Modal Content Container */
.mic-modal-content {
    font-family: Arial, sans-serif;
    color: var(--mic-modal-text-color);
    width: 90%;
    max-width: var(--mic-modal-max-width);
}

/* Modal Header */
.mic-modal-header {
    padding: var(--mic-modal-padding);
    background-color: var(--mic-modal-header-bg);
    text-align: center;
    border-bottom: 1px solid var(--mic-modal-border-color);
}

.mic-modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: var(--mic-modal-text-color);
}

/* Modal Body */
.mic-modal-body {
    padding: var(--mic-modal-padding);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mic-modal-context {
    font-size: 16px;
    margin-bottom: 20px;
}

.mic-modal-privacy-container {
    margin-bottom: 20px;
}

.mic-modal-privacy-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.mic-modal-privacy-header svg {
    margin-right: 8px;
}

.mic-modal-privacy-header span {
    font-weight: bold;
    font-size: 18px;
}

.mic-modal-privacy-list {
    list-style: disc;
    margin-left: 20px;
}

.mic-modal-privacy-list li {
    margin-bottom: 8px;
}

/* Button Group */
.mic-modal-button-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.mic-modal-primary-button,
.mic-modal-secondary-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: var(--mic-modal-button-text-color);
    transition: background-color var(--mic-modal-transition-duration) ease;
}

.mic-modal-primary-button {
    background-color: var(--mic-modal-button-bg);
}

.mic-modal-primary-button:hover {
    background-color: var(--mic-modal-button-hover-bg);
}

.mic-modal-secondary-button {
    background-color: var(--mic-modal-secondary-button-bg);
}

.mic-modal-secondary-button:hover {
    background-color: var(--mic-modal-secondary-button-hover-bg);
}

/* Loader inside the button */
.mic-modal-button-loader {
    display: none;
    margin-left: 10px;
    border: 2px solid var(--mic-modal-button-text-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: mic-modal-spinner 0.6s linear infinite;
}

.mic-modal-primary-button.loading .mic-modal-button-text {
    visibility: hidden;
}

.mic-modal-primary-button.loading .mic-modal-button-loader {
    display: inline-block;
}

@keyframes mic-modal-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .mic-modal-content {
        width: 95%;
    }

    .mic-modal-header h3 {
        font-size: 20px;
    }

    .mic-modal-context {
        font-size: 14px;
    }

    .mic-modal-privacy-header span {
        font-size: 16px;
    }
}

/* iframePopup.css */
.iframePopup-content-container {
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Ensure this is higher than other elements */
    overflow: hidden;
    position: fixed; /* Ensure it's positioned correctly */
    top: 10px;
    right: 10px;
    width: 48%; /* Adjust width as needed */
    height: 95%; /* Adjust height as needed */
    animation: fadeInIframe 0.5s ease-in-out; /* Add the animation */
}

@keyframes fadeInIframe {
    from {
        opacity: 0;
        transform: scale(0.0); /* Include the scale transformation */
    }
    to {
        opacity: 1;
        transform: scale(1); /* Restore the size */
    }
}

.iframePopup-buttons {
    position: absolute;
    top: 5px; /* Adjust as needed to hover above the iframe */
    left: 5px;
    display: flex;
    gap: 5px;
    z-index: 1001; /* Ensure buttons are above other content */
}

.iframePopup-buttons button {
    background-color: transparent;
    color: #000;
    border: 1px solid #ccc;
    padding: 5px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 3px;
    transition: background-color 0.3s, transform 0.3s;
}

.iframePopup-buttons button:hover {
    background-color: rgba(255, 255, 255, 0.623);
}

/* Expanded state */
.iframePopup-content-container.expanded {
    width: 95%;
    height: 95%;
    top: 10px;
    right: 10px;
}

/* Custom scrollbar styles */
.iframePopup-content-container iframe {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #ccc transparent; /* Firefox */
}

.iframePopup-content-container iframe::-webkit-scrollbar {
    width: 8px; /* Chrome, Safari, and Opera */
}

.iframePopup-content-container iframe::-webkit-scrollbar-thumb {
    background-color: #ccc; /* Chrome, Safari, and Opera */
    border-radius: 10px; /* Make the scrollbar thumb rounded */
}

.iframePopup-content-container iframe::-webkit-scrollbar-track {
    background-color: transparent; /* Chrome, Safari, and Opera */
}

/* Mobile view */
@media (max-width: 768px) {
    .iframePopup-content-container {
        top: auto;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 50%; /* Adjust height to fit the lower half of the screen */
    }

    .iframePopup-buttons {
        top: 5px; /* Adjust as needed for mobile view */
        left: 5px;
    }
}


#quiz-container .popup-header {
  padding: 15px 20px; 
  border-bottom: none; 
  min-height: auto;   
  background-color: #9c9c9c00;
}

#quiz-container.popup-base.style-minimal .popup-header {
}

#quiz-container .popup-base:not(.style-minimal) .popup-content {
  background: linear-gradient(135deg, rgba(156, 156, 156, 0.316) 0%, rgba(110, 110, 110, 0.382) 100%);
}

#quiz-container.popup-base.style-minimal .popup-content {
  background: transparent;
}

#quiz-container .popup-body {
  max-height: 500px;
  background-color: #9c9c9c00;
}

#quiz-container .popup-header h2 {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.quiz-question-wrapper {
  flex: 1 1 auto;
  overflow-y: none;
  padding: 2%;
  background-color: rgba(35, 35, 35, 0);
  border-radius: 12px;
  width: auto;
  margin-bottom: 1px;
}

.quiz-answers-wrapper {
  flex: 0 1 auto;
  overflow-y: auto; 
  height: 45vh;
  background-color: transparent;
  margin-bottom: 20px;
  border-radius: 12px;
  width: auto;
  display: flex;
  flex-direction: column;
}

.quiz-answer.selected {
  background-color: var(--button-color);
  color: var(--title-color);
}

.quiz-question {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: flex-start;
  font-size: 27px;
  font-weight: 300;
  width: 100%;
  line-height: 1.1;
  padding: 5px;
  margin-bottom: 20px;
}

.quiz-question p {
  font: 0.7em sans-serif;
}

.quiz-question img {
  max-width: 100%;
  height: auto;
  max-height: 150px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-left: auto; /* push image to the right */
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  border-radius: 12px;
  align-items: center;
}

/* Quiz answer default state */
.quiz-answer {
  background-color: rgb(0, 0, 0); 
  color: var(--text-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 
  inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  padding: 15px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  font-size: 20px;
  font-style: italic;

  line-height: 1.1;
  display: flex;
  justify-content: flex-start; /* text left */
  align-items: center;
  flex-direction: row;
}

.quiz-answer span {
  flex: 1;
  text-align: left;
}

#quiz-container.style-minimal .quiz-answer {
  background-color: transparent;
  width: 50%;
  box-shadow: none;
  border: solid 2px rgba(255, 255, 255, 0.2);
}

/* Hover state */
.quiz-answer:hover {
  background-color: rgba(131, 131, 131, 0.95); 
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15),
             inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Selected state (before submission) */
.quiz-answer.selected {
  background-color: rgba(156, 156, 156, 0.316);
  border: 3px solid rgb(255, 255, 255);
  box-shadow: 0 4px 6px rgba(66, 153, 225, 0.3),
             inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Correct answer state */
.quiz-answer.correct {
  background: linear-gradient(
    135deg, 
    rgba(72, 187, 120, 0.95) 0%,
    rgba(56, 161, 105, 0.95) 100%
  );
  color: white;
  border: 1px solid rgba(72, 187, 120, 0.3);
  box-shadow: 0 4px 6px rgba(72, 187, 120, 0.3),
             inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Incorrect answer state */
.quiz-answer.incorrect {
  background: linear-gradient(
    135deg,
    rgba(245, 101, 101, 0.95) 0%,
    rgba(229, 62, 62, 0.95) 100%
  );
  color: white;
  border: 1px solid rgba(245, 101, 101, 0.3);
  box-shadow: 0 4px 6px rgba(245, 101, 101, 0.3),
             inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Correct and incorrect states hover */
.quiz-answer.correct:hover,
.quiz-answer.incorrect:hover {
  transform: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15),
             inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.quiz-answer img {
  display: flex;
  align-self: center;
  max-height: 100px;
  margin-left: auto; /* push image to the right */
  height: auto;
  border-radius: 12px;
}


/* WebKit scrollbar styles for both elements */
.quiz-question-wrapper::-webkit-scrollbar,
.quiz-answers-wrapper::-webkit-scrollbar {
  width: 8px;
}

.quiz-question-wrapper::-webkit-scrollbar-track,
.quiz-answers-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.495);
  border-radius: 10px;
}

.quiz-question-wrapper::-webkit-scrollbar-thumb,
.quiz-answers-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-color);
  border-radius: 10px;
  border: 2px solid rgb(255, 246, 246);
}

.quiz-submit {
  margin-top: 10px;
  padding: 10px 10px;
  width: 50%;
  background-color: rgb(80, 80, 80);
  color: var(--title-color);
  border:rgb(164, 164, 164) 2px solid;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  align-self: center;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-submit:hover:not(:disabled) {
  background-color: var(--button-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quiz-submit:disabled {
  cursor: not-allowed;
}

/* Quiz Feedback Styles */
.quiz-feedback {
  display: none;
}

.quiz-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.quiz-feedback.correct {
  background-color: var(--button-color);
  color: var(--title-color);
}

.quiz-feedback.incorrect {
  background-color: var(--button-remove-color);
  color: var(--title-color);
}

/* Quiz Results Styles */
.quiz-results {
  text-align: center;
  padding: 40px 30px;
}

.quiz-results h2 {
  color: var(--title-color);
  font-size: 2.2em;
  margin-bottom: 25px;
}

.quiz-results p {
  font-size: 1.4em;
  color: var(--text-color);
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Quiz Progress Bar Styles */
.quiz-progress-bar {
  width: 100%;
  height: 10px;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  margin-top: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);

}

.quiz-progress-segment {
  flex: 1;
  height: 50%;
  position: relative;
  align-self: center;
  transition: background-color 0.3s ease;
}

.quiz-progress-segment::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: inherit;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease-out;
}

.quiz-progress-segment.filled::before {
  transform: scaleX(1);
}

/* Progress bar segments updated to match */
.quiz-progress-segment.correct {
  background: linear-gradient(
    to right,
    rgba(72, 187, 120, 0.95),
    rgba(56, 161, 105, 0.95)
  );
}

.quiz-progress-segment.incorrect {
  background: linear-gradient(
    to right,
    rgba(245, 101, 101, 0.95),
    rgba(229, 62, 62, 0.95)
  );
}
.question-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.quiz-progress-segment.show-number .question-number {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Animation for question numbers */
@keyframes popIn {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  70% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.quiz-progress-segment.show-number .question-number {
  animation: popIn 0.5s forwards;
}

/* Quiz Score Circle */
.quiz-score-circle {
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.circular-chart {
  display: block;
  margin: 10px auto;
  max-width: 80%;
  max-height: 250px;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 3.8;
}

.circle {
  fill: none;
  stroke: #fff;
  stroke-width: 2.8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease;
}

.quiz-percentage {
  fill: #fff;
  font-family: sans-serif;
  font-size: 0.5em;
  text-anchor: middle;
}

@media (max-width: 768px) {


  /* Container and Layout */
  #quiz-container .popup-content {
    padding: 12px;
    max-height: 95vh;
  }

  #quiz-container .popup-header {
    padding: 8px 12px;
    margin-bottom: 8px;
  }

  

  #quiz-container .popup-header h2 {
    font-size: 14px;
    letter-spacing: 0.3px;
  }

  /* Question Section */
  .quiz-question-wrapper {
    padding: 12px 8px;
    margin-bottom: 12px;
  }

  .quiz-question {
    font-size: 20px;
    padding: 0;
    margin-bottom: 16px;
    text-align: left;
    line-height: 1.4;
  }

  .quiz-question img {
    margin-top: 12px;
    border-radius: 8px;
    max-height: 200px;
    object-fit: cover;
  }

  /* Answers Section */
  .quiz-answers-wrapper {
    height: auto;
    max-height: 60vh;
    padding: 0 4px;
    margin-bottom: 12px;
  }

  .quiz-answers {
    gap: 10px;
    padding: 4px 0;
  }

  .quiz-answer {
    padding: 12px 16px;
    font-size: 16px;
    min-height: 44px;
    border-radius: 8px;
    font-style: normal;
  }

  .quiz-answer img {
    max-width: 40%;
    margin: 8px 0 8px auto; /* keep right aligned on mobile */
  }

  /* Better touch targets */
  .quiz-answer:hover {
    transform: translateY(-1px);
  }

  .quiz-answer.selected {
    transform: scale(0.98);
    border-width: 2px;
  }

  /* Progress Bar */
  .quiz-progress-bar {
    height: 6px;
    margin-top: 12px;
    border-radius: 8px;
  }

  .quiz-progress-segment {
    height: 100%;
  }

  .question-number {
    font-size: 11px;
  }

  /* Submit Button */
  .quiz-submit {
    width: 80%;
    padding: 12px;
    font-size: 16px;
    margin-top: 16px;
    height: 44px;
  }

  /* Results View */
  .quiz-results {
    padding: 20px 16px;
  }

  .quiz-results h2 {
    font-size: 1.8em;
    margin-bottom: 16px;
  }

  .quiz-results p {
    font-size: 1.1em;
    line-height: 1.4;
  }

  /* Score Circle */
  .quiz-score-circle {
    width: 120px;
    height: 120px;
  }

  .circular-chart {
    max-width: 70%;
    max-height: 200px;
  }

  /* Scrollbar */
  .quiz-answers-wrapper::-webkit-scrollbar {
    width: 4px;
  }

  /* Close Button */
  #quiz-close-btn {
    padding: 6px;
  }

  #quiz-close-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Additional breakpoint for very small devices */
@media (max-width: 380px) {

  .quiz-question {
    font-size: 18px;
  }

  .quiz-answer {
    font-size: 14px;
    padding: 10px 12px;
  }

  .quiz-submit {
    width: 90%;
    font-size: 14px;
  }

  .quiz-results h2 {
    font-size: 1.5em;
  }

  .quiz-score-circle {
    width: 100px;
    height: 100px;
  }
}

/* Base container */
.ui-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  font-family: 'Arial', sans-serif;
  z-index: 998; /* Ensure UI container is above the interaction indicators */
}

/* Frame - Default Style */
.ui-frame {
  position: absolute;
  background-color: transparent;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0);
  overflow: hidden;
  color: #333;
  pointer-events: auto;
  transition: all 0.3s ease;
  overflow-y: auto;
}

/* Frame - Chalkboard Style */
.ui-frame.chalkboard {
  padding: 10px;
  background-color: transparent;
  position: relative;
  font-family: 'Architects Daughter', 'Gloria Hallelujah', 'Kalam', cursive;
  border: 2px dashed #e8e8e895;
  border-style: dashed;

}

/* Frame subtitle */
.ui-frame.ui-subtitle-frame {
  font-size: 1.5vw;
  font-family: 'Arial', sans-serif;
  color: white;
  text-align: center;
  overflow: hidden;
}

/* Frame List styles */
.ui-frame.frame-list > * {
  position: relative !important;
  margin: 10px 0;
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
}

@media (max-width: 1024px) {
  .ui-frame {
    width: 100%;
    max-width: auto;
    max-height: auto;
    padding: 0px;
    border-radius: 7px;
  }

  .ui-frame.chalkboard {
    padding: 2px;
    border-width:0px;
  }

  .ui-frame.ui-subtitle-frame {
    font-size: 16px;
  }
}

/* Gated elements (disabled due to unmet requirements) */
.ui-gated {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.7) !important;
  pointer-events: auto !important; /* Allow clicks for notification */
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.ui-gated:hover {
  opacity: 0.6 !important;
}

/* Pulse highlight for guiding user attention to a specific UI element */
.ui-pulse-outline {
  position: relative;
  animation: uiPulseGlow 1.5s ease-in-out infinite !important;
  transition: none !important; /* Disable any existing transitions that might conflict */
}

@keyframes uiPulseGlow {
  0% { 
    outline: 2px solid rgba(255, 184, 0, 0.9);
    outline-offset: 2px;
    box-shadow: 0 0 0 0 rgba(255, 184, 0, 0.7), 0 0 15px rgba(255, 184, 0, 0.5);
  }
  50% { 
    outline: 3px solid rgba(255, 184, 0, 1);
    outline-offset: 4px;
    box-shadow: 0 0 0 8px rgba(255, 184, 0, 0), 0 0 25px rgba(255, 184, 0, 0.8);
  }
  100% { 
    outline: 2px solid rgba(255, 184, 0, 0.9);
    outline-offset: 2px;
    box-shadow: 0 0 0 0 rgba(255, 184, 0, 0.7), 0 0 15px rgba(255, 184, 0, 0.5);
  }
}
/* Base Button */
.ui-button {
  position: absolute;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 0.3rem;
  cursor: pointer;
  font-size: 20px;
  font-weight: 400;
  transition: all 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--primary-font);
}

/* Base Button Blink effect */
.ui-button.blink {
  animation: blink 1s infinite;
}

/* Default Style */
.ui-button.default {
  background-color: #f0f0f0;
  text-align: start;
  color: #333;
}

.ui-button.default:hover {
  background-color: #e0e0e0;
  transform: translateY(-px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Chalkboard Style */
.ui-button.chalkboard {
  background-color: transparent;
  min-height: fit-content;
  color: rgb(255, 255, 255);
  font-family: 'Helvetica Neue', sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  justify-content: flex-start !important;
  text-align: left !important;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.25);
}

.ui-button.chalkboard:hover {
  background-color: rgb(255, 255, 255);
  transform: scale(1.02);
  box-shadow: none;
}

.ui-button.chalkboard:active {
  transform: scale(0.98);
}

/* Special Buttons - Base Styles */
.ui-button.replay,
.ui-button.proceed,
.ui-button.goBack {
  background-color: transparent;
  border: 2px solid #ffffff89;
  color: #ffffff;
  width: auto;
  height: auto;
  border-radius: 28px;
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
  font-size: 12px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Replay Button */
.ui-button.replay {
  padding: 5px 15px 5px 56px;
}

.ui-button.replay::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.ui-button.replay::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  padding: 4px;
  transform: translate(-30%, -50%) rotate(135deg);
  transition: all 0.3s ease;
}

/* Proceed Button */
.ui-button.proceed {
  padding: 5px 56px 5px 15px;
}

.ui-button.proceed::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-left: 2px solid transparent;
  border-radius: 50%;
  transform: translate(50%, -50%);
  transition: all 0.3s ease;
}

.ui-button.proceed::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  padding: 4px;
  transform: translate(0, -50%) rotate(-45deg);
  transition: all 0.3s ease;
}

/* Go Back Button */
.ui-button.goBack {
  padding: 5px 15px 5px 56px;
}

.ui-button.goBack::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-right: 2px solid transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.ui-button.goBack::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  padding: 4px;
  transform: translate(-60%, -50%) rotate(135deg);
  transition: all 0.3s ease;
}

/* Special Buttons Hover States */
.ui-button.replay:hover,
.ui-button.proceed:hover,
.ui-button.goBack:hover {
  background-color: #ffffff;
  color: #000000;
  transform: scale(1.05);
}

.ui-button.replay:hover::before,
.ui-button.proceed:hover::before,
.ui-button.goBack:hover::before {
  border-color: #000000;
}

.ui-button.replay:hover::before { border-top-color: transparent; }
.ui-button.proceed:hover::before { border-left-color: transparent; }
.ui-button.goBack:hover::before { border-right-color: transparent; }

.ui-button.replay:hover::after,
.ui-button.proceed:hover::after,
.ui-button.goBack:hover::after {
  border-color: #000000;
}

/* Special Buttons Active States */
.ui-button.replay:active,
.ui-button.proceed:active,
.ui-button.goBack:active {
  transform: scale(0.95);
}

/* Special Expand Button */
.ui-button.expand {
  background-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0);
  border-radius: 4px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

/* SVG styling */
.ui-button.expand .expand-icon {
  width: 100%;
  height: 100%;
  /*svg stroke color*/
  stroke: #ffffffa9;
  stroke-width: 1;
  fill: none;
}

.ui-button.expand .expand-icon:hover {
  fill: rgb(255, 255, 255);
}

/* Special Info Button */
/* Info Button */
.ui-button.info {
  background-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

/* SVG styling */
.ui-button.info .info-icon {
  width: 100%;
  height: 100%;
}

/* Circle styling */
.ui-button.info .info-icon circle {
  fill: transparent;
  stroke: #ffffffaa;
  stroke-width: 1;
}

/* Text styling */
.ui-button.info .info-icon text {
  fill: #ffffffb1;
  font-size: 22px;
  font-family: serif;
  font-weight: bold;
}

/* Hover state */
.ui-button.info:hover {
  transform: scale(1.1);
}

.ui-button.info:hover .info-icon circle {
  fill: rgba(255, 255, 255, 0.561);
}

/* Active state */
.ui-button.info:active {
  transform: scale(0.95);
}

/* Animation for replay button */
@media (prefers-reduced-motion: no-preference) {
  .ui-button.replay:hover::before {
    animation: spin 0.8s linear infinite;
  }
}

/* Blink animation */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* Responsive design for special buttons */
@media (max-width: 1400px) {

  .ui-button.replay::before,
  .ui-button.replay::after {
    left: 50%;
  }

  .ui-button.proceed::before,
  .ui-button.proceed::after {
    right: 50%;
  }

  .ui-button.goBack::before,
  .ui-button.goBack::after {
    left: 50%;
  }

  .ui-button.replay span,
  .ui-button.proceed span,
  .ui-button.goBack span {
    display: none;
  }
  
}

@media (max-width: 1180px) {

  .ui-button {
    padding: 5px 5px;
  }

  .ui-button.ui-button.goBack,
  .ui-button.ui-button.proceed,
  .ui-button.ui-button.replay {
    border-radius: 6px;
    width: 16px;
    height: 56px;
    border: solid 1px #ffffff00;
    font-size: 10px;
    padding: 10px;
  }

  .ui-button.chalkboard {
    font-size: 14px;
    overflow-wrap:break-word;
    /* how to force it not to use capital letters */
    text-transform: none;
  }

  .ui-button.expand {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    position: fixed !important;
    padding: 6px !important;
  }
  
  .ui-button.expand .expand-icon {
    width: 100% !important;
    height: 100% !important;
  }

  .ui-button.info {
    width: 36px;
    height: 36px;
  }
  
  .ui-button.info .info-icon text {
    font-size: 20px;
  }
}


@media (max-width: 768px) {

  .ui-button.chalkboard {
    font-size: 10px;
  }

  .ui-button.replay,
  .ui-button.proceed,
  .ui-button.goBack {
    padding: 5px;
  }

}
/* Base Text Style */
.ui-text {
  position: absolute;
  color: #c7c7c7;
  font-size: 15px;
  pointer-events: auto;
  transition: all 0.3s ease;
  line-height: 1.6;
  display: flex;
  align-items: center;
  min-height: 32px;
}

/* Chalkboard Theme */
.ui-text.chalkboard {
  font-family: 'Chalkboard SE', 'Marker Felt', sans-serif;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: normal;
  position: relative;
}

/* Base styling for list elements */
.ui-text.chalkboard.ui-list-element {
  position: relative;  /* Container for bullet point */
  font-size: 18px;
}

/* Bullet point */
.ui-text.chalkboard.ui-list-element::before {
  content: '';
  position: absolute;
  left: 0px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 30px;
  line-height: 32px;  /* Match the min-height */
  height: 32px;
  display: flex;
  align-items: center;
}

/* Chalk underline */
.ui-text.chalkboard:not(.ui-list-active)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 10px;  /* Adjust this value to move underline up/down */
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.431);
}

@media (max-width: 1300px) {
  .ui-text {
    font-size: 12px;
    line-height: 1.0;
  }
  
  .ui-text.chalkboard {
    font-size: 12px;
    letter-spacing: 0.2px;
  }
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  .ui-text {
    font-size: 10px;
    line-height: 1.0;
  }
  
  .ui-text.chalkboard {
    font-size: 10px;
    letter-spacing: 0.2px;
  }
}
/* Base styles for list elements */
.ui-list-element {
    transition: all 0.01s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1.0;
  }
  
  /* Text elements */
  .ui-text.ui-list-element.ui-list-active {
    transform: scale(1.1);
    color: #FFD700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    position: relative;
  }


  .ui-text.ui-list-element.ui-list-inactive {
    opacity: 0.5;
  }
  
  /* Chalkboard theme text */
  .ui-text.chalkboard.ui-list-element.ui-list-active {
    color: #ffffff !important;
    letter-spacing: 1px;
  }
  
  .ui-button.ui-list-element.ui-list-active {
    background-color: rgb(29, 73, 131) !important;
    color: white !important;
    font-weight: 900 !important;
    box-shadow: 0 0 20px rgba(108, 134, 227, 0.5);
  }
  
  .ui-button.ui-list-element.ui-list-inactive {
    opacity: 0.6;
    background-color: #9e9e9e15;
  }
  
  .ui-frame.ui-list-element.ui-list-active {
    background-color: rgba(26, 48, 78, 0.707);
    box-shadow: 0 0 20px rgba(108, 134, 227, 0.3);
    transform: scale(1.05);
  }
  
  .ui-list-element[data-ui-category="tutorial"].ui-list-active {
    --ui-active-color: #2196F3;
    border: 2px solid #2196F3;
  }
  
  .ui-list-element[data-ui-category="navigation"].ui-list-active {
    --ui-active-color: #FF9800;
    border: 2px solid #FF9800;
  }

  .ui-button.list-item-completed {
    background-color: rgba(29, 73, 131, 0.7) !important;
    color: white !important;

  }

  .ui-button.list-item-completed::after {
    content: '     ✔';
    color: rgb(255, 255, 255);
    font-weight: 900;
    font-style: bold;
}

/* learningUI.css */
:root {
  --learning-bg: rgba(40, 44, 52, 0.89);
  --learning-bg-secondary: rgba(50, 55, 65, 0.85);
  --learning-border: rgba(255, 255, 255, 0.15);
  --learning-text-primary: #e8e8e8;
  --learning-text-secondary: #b0b8c4;
  --learning-text-muted: #8892a0;
  --learning-accent-primary: #61afef;
  --learning-accent-secondary: #56b6c2;
  --learning-success: #98c379;
  --learning-success-bg: rgba(152, 195, 121, 0.15);
  --learning-current-bg: rgba(97, 175, 239, 0.15);
  --learning-hover-bg: rgba(255, 255, 255, 0.05);
  --learning-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
  --learning-radius: 12px;
}

.learning-steps-container {
  position: fixed;
  top: 1%;
  left: 0.5%;
  width: 20%;
  height: 100%;
  overflow: hidden; /* Restore hidden overflow */
  z-index: 998;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Cleaner font stack */
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease; /* Smoother transition */
  opacity: 1;
}

.learning-steps-container.showing {
  animation: fadeInUp 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.learning-steps-container.hiding {
  animation: fadeOutDown 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes fadeOutDown {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(20px) scale(0.98);
    opacity: 0;
  }
}

.learning-steps-panel {
  background: var(--learning-bg);
  backdrop-filter: blur(10px) saturate(120%);
  border-radius: var(--learning-radius);
  box-shadow: var(--learning-shadow);
  overflow: hidden; /* Restore hidden overflow */
  border: 1px solid var(--learning-border);
  transition: all 0.3s ease;
  display: flex;
  height: 98%;
  flex-direction: column; /* Needed for max-height */
  position: relative; /* Add relative positioning for absolute overlay */
}

.learning-steps-header {
  display: flex;
  align-items: center;
  padding: 12px 16px; /* Slightly adjusted padding */
  background: var(--learning-bg-secondary);
  border-bottom: 1px solid var(--learning-border);
  flex-shrink: 0; /* Prevent header from shrinking */
}

.module-info {
  flex-grow: 1;
  margin-right: 12px; /* Increased spacing */
  overflow: hidden; /* Prevent text overflow */
}

.learning-steps-header h2 {
  margin: 0;
  font-size: 1rem; /* Slightly larger */
  font-weight: 600;
  color: var(--learning-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-progress {
  font-size: 0.75rem;
  color: var(--learning-text-secondary);
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 4px; /* Add space below title */
  display: inline-block; /* Fit content */
  font-weight: 500;
}

.collapse-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* Keep header actions compact and inline without increasing header height */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Exit button sized to same visual footprint as collapse button */
.exit-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: var(--learning-text-secondary);
}

.exit-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.exit-icon {
  width: 14px;
  height: 14px;
}

.collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.collapse-toggle .collapse-icon {
  fill: var(--learning-text-secondary);
  transition: transform 0.3s ease;
  width: 18px; /* Adjusted size */
  height: 18px;
}

.collapse-toggle.collapsed .collapse-icon {
  transform: rotate(-180deg); /* Correct collapse direction */
}

.collapsible-content {
  transition: max-height 0.4s ease, opacity 0.3s ease-out 0.1s; /* Adjusted transition */
  opacity: 1;
  overflow: hidden;
  max-height: 1000px; /* large default */
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Allow content to take remaining space */
}

.learning-steps-content {
  overflow-y: auto;
  flex-grow: 1; /* Allow list to scroll */
  padding: 8px 0; /* Add vertical padding */
}

/* Steps list items */
.learning-step {
  display: flex;
  align-items: flex-start; /* Align items to the top */
  padding: 10px 16px; /* Adjusted padding */
  gap: 12px; /* Increased gap */
  position: relative;
  cursor: default; /* Default cursor, clickable items will override */
  border-left: 4px solid transparent; /* Thicker border */
  transition: background 0.2s ease, border-color 0.2s ease;
  background-color: transparent;
}

.learning-step:not(.current):hover {
  background: var(--learning-hover-bg);
}

.learning-step.current {
  background: var(--learning-current-bg);
  border-left-color: var(--learning-accent-primary);
}

.learning-step.completed {
  border-left-color: var(--learning-success);
  /* Removed background flash application here, handled by animation */
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; /* Slightly smaller */
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--learning-text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 2px; /* Align better with text */
  transition: all 0.3s ease;
}

.learning-step.current .step-indicator {
  background: var(--learning-accent-primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(97, 175, 239, 0.3); /* Adjusted shadow */
}

.learning-step.completed .step-indicator {
  background: var(--learning-success);
  color: #fff;
}

.check-icon {
  width: 16px; /* Adjusted size */
  height: 16px;
  fill: currentColor;
}

.step-content {
  flex-grow: 1;
  padding-top: 2px; /* Align text baseline */
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px; /* Space between header and potential instructions */
}

.step-title {
  font-size: 0.9rem; /* Slightly larger step title */
  font-weight: 400;
  color: var(--learning-text-secondary);
  line-height: 1.4;
}

.learning-step.current .step-title {
  color: var(--learning-accent-primary);
  font-weight: 600;
}

.learning-step.completed .step-title {
  color: var(--learning-success);
  font-weight: 500;
  /* text-decoration: line-through; /* Optional: strike-through completed */
  /* opacity: 0.8; */
}

/* Info button */
.info-button {
  background: transparent;
  border: 1px solid var(--learning-accent-secondary);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.info-button:hover {
  background: rgba(86, 182, 194, 0.2);
  transform: scale(1.1);
}

.info-button svg {
  fill: var(--learning-accent-secondary);
  width: 14px; /* Adjusted size */
  height: 14px;
}

/* Current Step details at the bottom */
.current-step-details {
  padding: 16px;
  background: var(--learning-bg-secondary);
  border-top: 1px solid var(--learning-border);
  flex-shrink: 0; /* Prevent shrinking */
}

.current-step-header {
  font-size: 0.75rem;
  font-weight: 700; /* Bolder */
  color: var(--learning-accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px; /* Increased spacing */
  margin-bottom: 10px; /* More space */
}

.current-step-title {
  font-size: 1rem; /* Larger title */
  font-weight: 600;
  color: var(--learning-text-primary);
  margin-bottom: 8px; /* More space */
}

.current-step-instructions {
  font-size: 0.85rem; /* Slightly larger instructions */
  color: var(--learning-text-secondary);
  line-height: 1.6;
  white-space: pre-line;
  opacity: 1;
  transition: opacity 0.3s ease-out; /* Base transition */
}

.learning-steps-panel.collapsed .collapsible-content {
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease-in, opacity 0.2s ease-in; /* Adjusted collapse transition */
}

.learning-steps-panel.collapsed {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}

.learning-steps-panel.collapsed .learning-steps-header {
  border-radius: var(--learning-radius); /* Round corners when collapsed */
  margin-bottom: 0;
  border-bottom: none;
  /* Push the header to the bottom so the collapsed panel anchors bottom-left */
  margin-top: auto;
}

/* Custom Scrollbar */
.learning-steps-content::-webkit-scrollbar {
  width: 8px;
}
.learning-steps-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
.learning-steps-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.learning-steps-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Step completion animation for the checkmark */
@keyframes checkmarkPop {
  0% {
    transform: scale(0.3) rotate(-90deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.5) rotate(15deg);
    opacity: 1;
  }
  70% {
    transform: scale(0.8) rotate(-10deg);
  }
  90% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Background flash animation */
@keyframes stepCompleteFlash {
  0% {
    background-color: transparent; /* Start transparent */
  }
  50% {
    background-color: var(--learning-success-bg); /* Flash success color */
  }
  100% {
    background-color: transparent; /* End transparent */
  }
}

/* Apply the animation to the checkmark icon within a just-completed step */
.learning-step.step-just-completed .check-icon {
  animation: checkmarkPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.4) forwards;
  transform-origin: center;
}

/* Apply background flash to the just-completed step item */
.learning-step.step-just-completed {
  /* Apply flash animation. Note: This will override hover background during animation */
  animation: stepCompleteFlash 0.8s ease-out forwards;
}

/* Ensure the target container has some base styling */
.current-step-content {
    padding: 10px; /* Adjust as needed */
    margin: 5px 0; /* Adjust as needed */
    border-radius: 4px; /* Optional: for rounded corners */
    /* background-color: #333; */ /* Let existing theme handle background */
    transition: background-color 0.3s ease-out, outline 0.3s ease-out; /* Smooth transitions back */
}

/* Fade animations for instructions text */
.current-step-instructions {
    opacity: 1;
    transition: opacity 0.3s ease-out; /* Base transition */
}

.fade-out-text {
    animation: fadeOutInstructions 0.3s ease-out forwards;
}

.fade-in-text {
    animation: fadeInInstructions 0.4s ease-in forwards;
}

@keyframes fadeOutInstructions {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeInInstructions {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 1030px) {
  .module-title {
    display: none;
  }

  .module-progress {
    display: none; /* Hide module progress on smaller screens */
  }

  .collapse-toggle, .exit-toggle {
    padding: 0px;
  }

  .learning-step {
    padding: 3% !important; /* Remove padding for mobile */
    padding-bottom: 10% !important; /* Add bottom padding for mobile */
  }

  .learning-steps-content {
    padding: 0px; /* Reduce padding for smaller screens */
    margin: 0px;
    overflow-x: hidden;
  }

  .learning-steps-panel {
    padding: 0px;
    margin: 0px;
    
  }

  .collapsible-content {
    padding: 0px;
    margin: 0px;
  }

  .learning-step {
    padding: 8px 12px; /* Reduced padding for mobile */
    gap: 6px; /* Reduced gap */
    font-size: 0.9rem; /* Smaller font size */
    word-break: break-word; /* Allow long words to break */
    border-left-width: 1px; /* Thinner border on mobile */
  }

  .step-indicator {

    font-size: 0.5rem; /* Smaller font size */
    height: 12px;
    width: 12px; /* Smaller size for mobile */
  }
  .step-title {
    font-size: 0.6rem; /* Smaller title on mobile */
  }

  .current-step-header {
    display: none;
  }

  .current-step-title {
    font-size: 0.8rem; /* Smaller title on mobile */
    margin-top: 10px;
    margin-bottom: 6px; /* Reduced margin */
  }

  .current-step-instructions {
    font-size: 0.75rem; /* Smaller instructions on mobile */
    line-height: 1.2; /* Adjusted line height */
    margin-bottom: 8px; /* Reduced margin */
  }

  .current-step-content {
    padding: 0px; /* Reduced padding for mobile */
    margin: 0px 0; /* Reduced margin */
    background-color: var(--learning-bg-secondary); /* Use secondary background */
    border-radius: var(--learning-radius); /* Use theme radius */
  }

  .current-step-details {
    padding: 8px; /* Reduced padding for mobile */
    background: var(--learning-bg-secondary); /* Use secondary background */
    border-top: 1px solid var(--learning-border);
  }

  /* Navigation buttons layout on mobile (portrait) */
  .current-step-navigation {
    flex-direction: column;
    gap: 12px;
    align-items: stretch; /* make buttons take full width */
  }

  .current-step-navigation .step-nav-back,
  .current-step-navigation .step-nav-replay,
  .current-step-navigation .step-nav-proceed {
    width: 90%;
    height: 90%;
    align-self: center;

  }

  /*the scrollbar should be more narrow*/
  .learning-steps-content::-webkit-scrollbar {
    width: 4px; /* Narrower scrollbar */
  }

}

/* Highlight effect for the current step content box */
.highlight-step-content {
  animation: blink-border 0.4s 10; /* Blink border 3 times */
}

/* Keyframes for a border blink effect */
@keyframes blink-border {
  0%, 100% {
    outline: 2px solid transparent; /* Start/end with no outline */
    outline-offset: 2px;
  }
  50% {
    outline: 2px solid rgba(0, 150, 255, 0.8); /* Bright blue outline */
     outline-offset: 2px;
  }
}

/* Step Details as Full Panel Overlay */
.step-details-expanded {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent; /* Changed from rgba(20, 24, 32, 0.65) */
  pointer-events: auto;
  /* Remove border-radius and box-shadow from overlay, move to content */
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  transform: none;
}

.step-details-modal-content {
  background: linear-gradient(135deg, var(--learning-bg) 0%, rgba(40, 44, 52, 0.98) 100%);
  border-radius: var(--learning-radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  max-width: 420px;
  min-width: 320px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Remove previous centering rules for > .step-details-header, > .step-details-content */
.step-details-expanded > .step-details-header,
.step-details-expanded > .step-details-content {
  background: none;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
  min-width: 0;
  width: auto;
  margin: 0;
  position: static;
  padding: 0;
}


.step-details-header {
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, var(--learning-bg) 0%, rgba(40, 44, 52, 0.9) 100%);
  border-bottom: 1px solid var(--learning-border);
  position: relative;
  flex-shrink: 0; /* Prevent header from shrinking */
  min-height: 80px; /* Use min-height instead of fixed height to allow expansion */
  display: flex;
  align-items: center;
}

.step-details-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--learning-border) 20%, 
    var(--learning-accent-primary) 50%, 
    var(--learning-border) 80%, 
    transparent 100%
  );
}

.step-details-title-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.step-details-step-title {
  margin: 0;
  font-size: 1rem; /* Keep the reduced size for better fit */
  font-weight: 700;
  color: var(--learning-text-primary);
  line-height: 1.3; /* Slightly increased for better readability when wrapping */
  flex-grow: 1;
  /* Restore the beautiful gradient text effect */
  background: linear-gradient(135deg, var(--learning-text-primary) 0%, var(--learning-accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  /* Keep the spacing that prevents cutoff */
  padding-left: 30px; /* Space for sparkle icon */
  margin-left: 10px; /* Extra margin to prevent sparkle cutoff */
  /* Allow wrapping for variable length titles */
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: calc(100% - 40px); /* Ensure it doesn't push into the step number */
}

.step-details-step-title::before {
  content: '✨';
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  animation: sparkle 2s ease-in-out;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.1); }
}

.step-details-number {
  background: linear-gradient(135deg, var(--learning-accent-primary) 0%, var(--learning-accent-secondary) 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(97, 175, 239, 0.3);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-details-number::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.step-details-expanded.flashing .step-details-number::before {
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.step-details-content {
  padding: 0;
  position: relative;
  flex: 1; /* Use flex: 1 instead of flex-grow: 1 for better space distribution */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Important: allows flex item to shrink below content size */
}

.step-details-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, 
    var(--learning-accent-primary) 0%, 
    var(--learning-accent-secondary) 50%, 
    transparent 100%
  );
  border-radius: 2px;
  opacity: 0.6;
  pointer-events: none; /* Don't interfere with scrolling */
}

/* Custom scrollbar for the content area */
.step-details-content::-webkit-scrollbar {
  width: 6px;
}

.step-details-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.step-details-content::-webkit-scrollbar-thumb {
  background: rgba(97, 175, 239, 0.4);
  border-radius: 3px;
}

.step-details-content::-webkit-scrollbar-thumb:hover {
  background: rgba(97, 175, 239, 0.6);
}

.step-details-instructions {
  margin: 24px 24px 20px 44px; /* Add proper margins */
  font-size: 0.9rem !important;
  color: var(--learning-text-secondary);
  line-height: 1.7;
  white-space: pre-line;
  position: relative;
  padding-left: 8px;
  word-wrap: break-word; /* Ensure long words wrap */
  flex-grow: 1;
}

.step-details-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 24px 24px 24px; /* Proper margins */
  flex-shrink: 0; /* Prevent footer from shrinking */
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.step-details-ok-button {
  background: linear-gradient(135deg, var(--learning-accent-primary) 0%, var(--learning-accent-secondary) 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 140px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 6px 20px rgba(97, 175, 239, 0.4);
}

.step-details-ok-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.step-details-ok-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(97, 175, 239, 0.6);
}

.step-details-ok-button:hover::before {
  left: 100%;
}

.step-details-ok-button:active {
  transform: translateY(-1px) scale(0.95) !important;
  transition: all 0.1s ease !important;
}

.step-details-ok-button:focus {
  outline: none;
  box-shadow: 0 6px 20px rgba(97, 175, 239, 0.4), 0 0 0 4px rgba(97, 175, 239, 0.3) !important;
  transition: box-shadow 0.3s ease;
}

/* Add a subtle pulse animation to the entire section when flashing */
.step-details-expanded.flashing .step-details-content {
  animation: contentPulse 2s ease-in-out infinite;
}

@keyframes contentPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.005); }
}

/* Add sparkle animation for particle effects */
@keyframes sparkleFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--end-x), var(--end-y)) scale(0);
  }
}

/* Mobile responsiveness for step details modal */
.step-details-expanded {
  border-radius: var(--learning-radius);
}

.step-details-header {
  padding: 16px 20px 12px;
  min-height: 60px; /* Smaller minimum height on mobile */
}

.step-details-step-title {
  font-size: 0.9rem; /* Smaller on mobile */
}

.step-details-step-title::before {
  left: -20px;
  font-size: 0.8rem;
}

.step-details-number {
  font-size: 0.75rem;
  padding: 4px 12px;
}

.step-details-content::before {
  left: 20px;
}

.step-details-instructions {
  font-size: 0.85rem;
  margin: 20px 20px 16px 36px;
}

.step-details-footer {
  margin: 12px 20px 20px 20px;
}

.step-details-ok-button {
  padding: 12px 24px;
  font-size: 0.85rem;
  min-width: 120px;
}

/* Speaker icon */
.speaker-icon {
  background: transparent;
  border: none;
  color: var(--learning-accent-primary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.8;
}
.speaker-icon:hover {
  transform: scale(1.1);
  opacity: 1;
}
.speaker-icon.disabled {
  color: var(--learning-text-muted);
  opacity: 0.4;
}
.speaker-icon.active {
  animation: pulseSpeaker 1s infinite;
}
@keyframes pulseSpeaker {
  0% { transform: scale(1); color: var(--learning-accent-primary); }
  50% { transform: scale(1.15); color: var(--learning-accent-secondary); }
  100% { transform: scale(1); color: var(--learning-accent-primary); }
}

/* Proceed button attention cue (more eye-catching on first blink, then gentle pulse) */
.blink-proceed-btn {
  position: relative; /* enable ::after halo */
  z-index: 0;
  animation: proceed-pulse 1.2s ease-in-out infinite;
}

/* one-time expanding halo when the class is first applied */
.blink-proceed-btn::after {
  content: '';
  position: absolute;
  inset: -6px; /* extend slightly beyond button */
  border-radius: 24px; /* match rounded button */
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  box-shadow: 0 0 0 0 rgba(97, 175, 239, 0.8);
  animation: proceed-halo 650ms ease-out 1;
}

@keyframes proceed-halo {
  0% { opacity: 0.9; box-shadow: 0 0 0 0 rgba(97, 175, 239, 0.8); transform: scale(0.9); }
  60% { opacity: 0.5; box-shadow: 0 0 0 10px rgba(86, 182, 194, 0.35); transform: scale(1.08); }
  100% { opacity: 0; box-shadow: 0 0 0 18px rgba(97, 175, 239, 0); transform: scale(1.12); }
}

@keyframes proceed-pulse {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 0 0 rgba(0,0,0,0); }
  50% { transform: translateY(-1px) scale(1.04); box-shadow: 0 6px 16px rgba(97, 175, 239, 0.45); }
}

/* Navigation buttons container (controlled mode) */
.current-step-navigation {
  display: none; /* Shown via JS when in controlled mode */
  justify-content: center;
  gap: 16px;
  padding: 8px 0;
}

/* Style for navigation buttons */
.current-step-navigation .step-nav-back,
.current-step-navigation .step-nav-replay,
.current-step-navigation .step-nav-proceed {
  background: linear-gradient(135deg, var(--learning-accent-primary) 0%, var(--learning-accent-secondary) 100%);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.current-step-navigation .step-nav-back:hover,
.current-step-navigation .step-nav-replay:hover,
.current-step-navigation .step-nav-proceed:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.current-step-navigation .step-nav-back:disabled,
.current-step-navigation .step-nav-replay:disabled,
.current-step-navigation .step-nav-proceed:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Icon style inside navigation buttons */
.current-step-navigation .nav-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Visually hidden text for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
  
/***************************************************************
 * Side Panel Layout
 ***************************************************************/
 .learning-editor-sidepanel {
  position: fixed;
  top: 10%;
  right: 0;
  width: 30%;
  height: 90%;
  background-color: #2e2e2e;
  box-shadow: -2px 0 6px rgba(0,0,0,0.4);
  
  /* Initial state for popupManager integration */
  transform: translateX(110%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease; 

  z-index: 999;
  display: flex;
  flex-direction: column;
  pointer-events: auto; /* ensures panel intercepts the mouse */
}

/* ADD .active selector from popupManager */
.learning-editor-sidepanel.active {
  transform: translateX(0%);
  opacity: 1;
  visibility: visible;
}

/* Header with close/back buttons */
.lesp-header {
  display: flex;
  align-items: center;
  background: #3c3c3c;
  padding: 10px 15px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.1);
}

.lesp-header-title {
  flex: 1;
  text-align: center;
  color: #ffffff;
  margin: 0;
  font-weight: 600;
  font-size: 16px;
}

.lesp-icon-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  margin: 0 5px;
  font-size: 18px;
  transition: color 0.2s ease;
}

.lesp-icon-btn:hover {
  color: #ffca28; /* highlight color */
}

.lesp-icon {
  pointer-events: none;
}

#lesp-close-btn .lesp-icon-close {
  font-size: 22px; /* slightly larger X */
}

#lesp-back-btn .lesp-icon-arrow {
  font-size: 16px; /* smaller arrow */
}

/* Scrollbar styles */
.lesp-body::-webkit-scrollbar,
.lesp-object-list-container::-webkit-scrollbar,
.lesp-list::-webkit-scrollbar,
.ai-wizard-json-preview::-webkit-scrollbar,
.ai-wizard-prompt-group pre::-webkit-scrollbar {
  width: 8px;
}

.lesp-body::-webkit-scrollbar-track,
.lesp-object-list-container::-webkit-scrollbar-track,
.lesp-list::-webkit-scrollbar-track,
.ai-wizard-json-preview::-webkit-scrollbar-track,
.ai-wizard-prompt-group pre::-webkit-scrollbar-track {
  background: #2e2e2e;
}

.lesp-body::-webkit-scrollbar-thumb,
.lesp-object-list-container::-webkit-scrollbar-thumb,
.lesp-list::-webkit-scrollbar-thumb,
.ai-wizard-json-preview::-webkit-scrollbar-thumb,
.ai-wizard-prompt-group pre::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.lesp-body::-webkit-scrollbar-thumb:hover,
.lesp-object-list-container::-webkit-scrollbar-thumb:hover,
.lesp-list::-webkit-scrollbar-thumb:hover,
.ai-wizard-json-preview::-webkit-scrollbar-thumb:hover,
.ai-wizard-prompt-group pre::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* For Firefox */
.lesp-body,
.lesp-object-list-container,
.lesp-list,
.ai-wizard-json-preview,
.ai-wizard-prompt-group pre {
  scrollbar-width: thin;
  scrollbar-color: #555 #2e2e2e;
}

/* Body */
.lesp-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #2e2e2e;
}

/* Container for each "screen" */
.lesp-screen-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/***************************************************************
 * Buttons
 ***************************************************************/
.lesp-btn {
  display: inline-block;
  padding: 2px 2px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  outline: none;
}

.lesp-btn:hover {
  transform: translateY(-1px);
}

.lesp-add-btn {
  background-color: #007bff;
  color: #ffffff;
}

.lesp-add-btn:hover {
  background-color: #0092ff;
}

.lesp-action-btn {
  background-color: transparent;
  color: #ddd;
  border: 1px solid #555;
  margin-left: 4px;
}

.lesp-action-btn:hover {
  background-color: #555;
  color: #fff;
}

/***************************************************************
 * Lists
 ***************************************************************/
.lesp-list {
  background-color: #3a3a3a;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #444;
}

.lesp-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #444;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lesp-list-item:last-child {
  border-bottom: none;
}

.lesp-list-item:hover {
  background-color: #4c4c4c;
}

.lesp-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesp-item-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.lesp-item-status {
  font-size: 12px;
  color: #bbb;
}

.lesp-item-actions {
  display: flex;
  gap: 8px;
}

.lesp-edit-btn,
.lesp-delete-btn {
  font-size: 12px;
  padding: 4px 8px;
}

/* Style for the new Test button */
.lesp-test-btn,
.lesp-test-step-btn {
  font-size: 12px; /* Match other action buttons */
  padding: 4px 8px;
  color: #4caf50; /* Greenish color for play/test */
  border-color: #4caf50;
}

.lesp-test-btn:hover,
.lesp-test-step-btn:hover {
  background-color: #4caf50; /* Green background on hover */
  color: #fff; /* White icon/text on hover */
}

/* Icons inside play/test buttons */
.lesp-test-btn i,
.lesp-test-step-btn i {
  /* Styles specific to the icon if needed */
}

/* Style for the Stop Step button (next to Test Step button) */
.lesp-stop-step-btn {
  font-size: 12px;
  padding: 4px 8px;
  color: #f44336; /* Reddish color for stop */
  border-color: #f44336;
}

.lesp-stop-step-btn:hover {
  background-color: #f44336; /* Red background on hover */
  color: #fff; /* White icon/text on hover */
}

.lesp-stop-step-btn i {
  /* Styles specific to the icon if needed */
}

/* Blinking animation for the LESP Stop Button when a test is active */
.lesp-stop-btn-blinking, .lesp-stop-btn-blinking:hover {
  color: #fff; /* White text when blinking */
  background-color: #ff9800; /* Orange background, distinct from normal hover */
  border-color: #ff9800;
  animation: lesp-button-pulse 1.2s infinite;
  box-shadow: 0 0 0 0 rgba(255,152,0,0.7);
}

/* General pulse animation for LESP buttons if needed elsewhere */
@keyframes lesp-button-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255,152,0,0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255,152,0,0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255,152,0,0);
    transform: scale(1);
  }
}

/***************************************************************
 *  Step List Specifics
 ***************************************************************/
.lesp-drag-handle {
    cursor: grab;
    padding: 0 10px;
    font-size: 1.2em;
    color: #ccc;
    transition: color 0.2s;
}
.lesp-drag-handle:hover {
    color: #fff;
}
.lesp-drag-handle:active {
    cursor: grabbing;
}

/* ====================================================
    4) COURSE FORM
==================================================== */
.lesp-course-form-container {
    padding: 10px;
}
.lesp-form {
  display: flex;
  flex-direction: column;
  gap: 15px; /* Spacing between form groups */
}

.lesp-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lesp-form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #ccc;
}

.lesp-form input,
.lesp-form textarea {
    padding: 8px;
    border-radius: 4px;
    background: #2e2e2e;
    color: #fff;
    border: 1px solid #555;
    width: 100%;
    box-sizing: border-box;
}

.lesp-form textarea {
    resize: vertical;
    min-height: 80px;
}

.lesp-form h3,
.lesp-form h4 {
    color: #eee;
    margin: 10px 0 5px 0;
    border-bottom: 1px solid #4f4f4f;
    padding-bottom: 5px;
}

.lesp-instructions {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 10px;
}

.lesp-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.lesp-submit-btn {
    background-color: #28a745;
    color: #fff;
}
.lesp-submit-btn:hover {
    background-color: #218838;
}

.lesp-cancel-btn {
    background-color: #6c757d;
    color: #fff;
}

.lesp-cancel-btn:hover {
    background-color: #5a6268;
}

/* ------------------
    AI Wizard Forms
   ------------------ */
.lesp-ai-decide-steps-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.1);
    padding: 8px;
    border-radius: 4px;
}
.lesp-ai-decide-steps-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 0; /* Override default */
}

.lesp-form input[type="number"] {
    width: 70px; /* Smaller width for number inputs */
}

.lesp-form input[type="number"]:disabled {
    background-color: #4a4a4a;
    cursor: not-allowed;
}


.lesp-ai-decide-objects-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0,0,0,0.1);
    padding: 8px;
    border-radius: 4px;
}

.lesp-ai-decide-objects-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 0;
}
.lesp-object-list-container {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #4a4a4a;
    padding: 8px;
    border-radius: 4px;
    background-color: #2a2a2a;
}
.ai-wizard-progress {
    text-align: center;
    padding: 15px;
    background-color: #4a4a4a;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}
.ai-wizard-progress span {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #ccc;
}
.ai-wizard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Module List Actions Header (AI Wizard etc.) */
.lesp-module-actions-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;

    background-color: #383838;
    border-radius: 4px;
    justify-content: space-around; /* Center buttons */
}
.lesp-ai-wizard-btn {
    background-color: #6a0dad;
    color: white;
}
.lesp-ai-wizard-btn:hover {
    background-color: #8a2be2;
}

/* AI Wizard screen specifics */
.ai-wizard-step {
    padding: 15px;
    border: 1px solid #4f4f4f;
    border-radius: 4px;
    background-color: #3a3a3a;
    display: flex;
    flex-direction: column;
    color: white;
    gap: 12px;
}

.ai-wizard-step h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: none; /* Override default h3 border */
    padding-bottom: 0;
    margin: 0;
}
.ai-wizard-step h3 i {
    font-size: 16px;
    color: #ffca28;
}

.lesp-checkbox {
    width: 16px; height: 16px;
}

.ai-wizard-prompt-group pre {
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    white-space: pre-wrap; /* Wrap long lines */
    word-break: break-all;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
}
.ai-wizard-json-preview {
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    max-height: 300px;
    overflow-y: auto;
}
.ai-wizard-json-preview code {
    white-space: pre-wrap;
    word-break: break-all;
    font-family: monospace;
    font-size: 12px;
}
/* General purpose icon usage in buttons */
.lesp-btn i {
    font-size: 1.1em;
    line-height: 1;
}

.ai-wizard-object-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* Responsive side panel */
@media(max-width: 768px) {
  .learning-editor-sidepanel {
    width: 100%;
    transform: translateY(110%);
  }
}

/* Step Form */
.lesp-form-separator {
    border: none;
    border-top: 1px solid #4f4f4f;
    margin: 15px 0;
}

.lesp-chain-display {
    background-color: #2a2a2a;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #555;
    font-family: monospace;
    font-size: 12px;
    color: #eee;
    min-height: 20px;
    word-break: break-all;
}

/***************************************************************
 * Overlays & Spinners
 ***************************************************************/
.lesp-dedicated-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 10; /* Above panel content but below external popups */
    display: none; /* Hidden by default */
}

/* Make sure spinner appears on top of the dedicated overlay */
.learning-editor-sidepanel .spinner-container { /* Assuming spinner is wrapped in .spinner-container by showSpinner */
    z-index: 20; /* Higher than the overlay */
}

.lesp-form-group.inline-checkbox {
  display: grid;
  grid-template-columns: 1fr auto; /* label/tooltip take remaining space, checkbox sticks right */
  align-items: center;
  column-gap: 8px;
}

.lesp-form-group.inline-checkbox input[type="checkbox"] {
  margin-left: 0;
}

/***************************************************************
 * Panel Resize Handle
 ***************************************************************/
.panel-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  z-index: 1000;
  transition: background-color 0.2s ease;
}

.panel-resize-handle:hover {
  background: linear-gradient(90deg, rgba(255,202,40,0.4) 0%, transparent 100%);
}

.panel-resize-handle::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  transition: background-color 0.2s ease, height 0.2s ease;
}

.panel-resize-handle:hover::before {
  background: rgba(255,202,40,0.8);
  height: 60px;
}

.panel-resizing .panel-resize-handle {
  background: linear-gradient(90deg, rgba(255,202,40,0.5) 0%, transparent 100%);
}

.panel-resizing .panel-resize-handle::before {
  background: #ffca28;
  height: 80px;
}

/* Prevent interactions during resize */
body.panel-resize-active {
  cursor: ew-resize !important;
}

body.panel-resize-active * {
  cursor: ew-resize !important;
}

body.panel-resize-active .learning-editor-sidepanel .lesp-body {
  pointer-events: none;
}

/* ====================================================
   STEP FORM – NARRATOR & SUBTITLES SECTION
   ==================================================== */
.lesp-narrator-container {
  background: rgba(97, 175, 239, 0.05);
  border: 1px solid rgba(97, 175, 239, 0.2);
  border-radius: 6px;
  padding: 12px;
  margin-top: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap; /* handle smaller widths */
}

.lesp-narrator-label {
  font-weight: 500;
  color: #61afef;
}

/* Hint line inside narrator area */
.lesp-narrator-hint {
  flex-basis: 100%;
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Ensure buttons in narrator container align nicely */
.lesp-narrator-container .lesp-btn {
  margin-top: 0; /* reset potential inherited margins */
}

/* Status text (small tag at end) */
.lesp-narrator-container small {
  font-size: 0.8rem;
  color: rgba(97,175,239,0.8);
  margin-left: auto;
}

/* Subtitles box lives inside narrator container */
.lesp-subtitles-container {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  gap: 8px;
  margin-top: 8px; /* slight spacing from buttons */
}

.lesp-subtitles-container textarea,
.lesp-subtitles-textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(97, 175, 239, 0.3);
  border-radius: 4px;
  resize: vertical;
  font-family: monospace;
  font-size: 0.85rem;
  background: rgba(97,175,239,0.07);
  color: #c8d3f5;
  min-height: 80px;
}

.lesp-subtitles-container small {
  opacity: 0.7;
  font-size: 0.75rem;
}
/* ==================================================== */
/* infoTooltip.css */
#tooltip-root {
    /* A parent element to contain all tooltips, ensures they are stacked on top. */
    position: relative; /* Not strictly necessary since we use position: fixed on tooltips */
    z-index: 99999; /* Higher than most UI elements */
  }
  
  /* Container that holds the info icon */
  .info-tooltip-container {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    position: relative;
  }
  
  /* The icon/button itself */
  .info-tooltip-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
  }
  
  .info-tooltip-icon:hover {
    color: #999;
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .info-tooltip-icon.active {
    color: #3f51b5;
    background-color: rgba(63, 81, 181, 0.1);
  }
  
  .info-tooltip-icon.urgent-continuous-blink {
    color: #ff9800;
    animation: info-pulse 1.2s infinite;
    box-shadow: 0 0 0 0 rgba(255,152,0,0.7);
  }
  
  .info-tooltip-icon.urgent-single-blink {
    color: #ff9800;
    animation: info-pulse 1.2s 1;
    box-shadow: 0 0 0 0 rgba(255,152,0,0.7);
  }
  
  @keyframes info-pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(255,152,0,0.7);
      transform: scale(1);
    }
    70% {
      box-shadow: 0 0 0 10px rgba(255,152,0,0);
      transform: scale(1.15);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(255,152,0,0);
      transform: scale(1);
    }
  }
  
  /* The content box that pops up */
  .info-tooltip-content {
    position: fixed;
    background-color: #1f1f1f;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 16px;
    width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  
  /* Class to show content */
  .info-tooltip-content.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 10000; /* Ensure tooltip is on top of most elements */
  }
  
  /* Tooltip content styling */
  .info-tooltip-content h3 {
    color: #fff;
    font-size: 16px;
    margin: 0 0 12px 0;
    font-weight: 600;
  }
  
  .info-tooltip-content p {
    color: #bbb;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
  }
  
  .info-tooltip-content ul {
    color: #bbb;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding-left: 20px;
  }
  
  .info-tooltip-content li {
    margin-bottom: 6px;
  }
  
  .info-tooltip-content li:last-child {
    margin-bottom: 0;
  }
  
  .info-tooltip-content strong {
    color: #fff;
    font-weight: 600;
  }
  
/* Quiz Form Specific Styles */
.qesp-questions-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.qesp-question-block {
  background-color: #3a3a3a;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qesp-question-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #555;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.qesp-question-title {
  color: #ffca28; /* Highlight color */
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  flex-grow: 1;
}

.qesp-remove-question-btn {
  background: transparent;
  border: none;
  color: #ff6b6b; /* Reddish color for delete */
  cursor: pointer;
  padding: 2px;
}
.qesp-remove-question-btn:hover {
  color: #ff4f4f;
}

.qesp-question-block h6 {
  color: #eee; /* Slightly brighter for Answer section title */
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 14px;
  border-top: 1px dashed #555;
  padding-top: 10px;
}

/* Answer Styling */
.qesp-answers-container {
  display: flex;
  flex-direction: column;
  gap: 15px; /* Space between answer blocks */
  padding-left: 10px; /* Indent answers slightly */
}

.qesp-answer-block {
  background-color: #444; /* Slightly darker than question block */
  border: 1px solid #606060;
  border-radius: 3px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Align controls to top */
  gap: 10px;
}

.qesp-answer-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qesp-answer-text-group,
.qesp-answer-image-group {
  /* Inherits form-group styles, add specifics if needed */
}

.qesp-answer-text-group label,
.qesp-answer-image-group label {
  font-size: 12px;
  color: #ccc;
  margin-bottom: 2px;
}

.qesp-answer-controls {
  display: flex;
  flex-direction: column; /* Stack checkbox and remove button */
  align-items: flex-end; /* Align controls to the right */
  gap: 8px;
  min-width: 80px; /* Ensure space for controls */
}

.qesp-correct-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #ddd;
  cursor: pointer;
}

.qesp-correct-checkbox {
  cursor: pointer;
}

.qesp-remove-answer-btn {
  background: transparent;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 13px; /* Smaller remove icon */
  padding: 0;
}

.qesp-remove-answer-btn:hover {
  color: #ff6b6b;
}

/* Image Selector Styling */
.qesp-image-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap; /* Allow wrapping if space is tight */
}

.qesp-image-id-display {
  background-color: #2e2e2e;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  color: #ccc;
  min-width: 50px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px; /* Prevent ID from taking too much space */
}

.qesp-browse-image-btn,
.qesp-clear-image-btn {
  padding: 4px 8px;
  font-size: 12px;
  /* Reuse lesp-action-btn styles if desired */
  background-color: #555;
  color: #fff;
  border: 1px solid #777;
  border-radius: 3px;
  cursor: pointer;
}

.qesp-browse-image-btn:hover,
.qesp-clear-image-btn:hover {
  background-color: #666;
}

.qesp-clear-image-btn {
  color: #ffcccc;
}

.qesp-image-preview {
  max-width: 60px; /* Constrain preview size */
  max-height: 40px;
  border-radius: 3px;
  border: 1px solid #666;
  object-fit: cover;
  margin-left: 5px;
}

/* Add Buttons */
.qesp-add-question-btn,
.qesp-add-answer-btn {
  margin-top: 10px;
  padding: 6px 12px;
  font-size: 13px;
  background-color: #5a5a5a;
  color: #eee;
  border: 1px dashed #777;
  width: fit-content; /* Don't take full width */
  align-self: flex-start; /* Align to left */
}

.qesp-add-question-btn:hover,
.qesp-add-answer-btn:hover {
  background-color: #6a6a6a;
  border-color: #888;
}

.qesp-add-answer-btn {
  margin-top: 5px;
  margin-left: 0; /* No extra indent needed */
  align-self: flex-start;
}

.qesp-add-question-btn i,
.qesp-add-answer-btn i {
  margin-right: 5px;
}

/* Inputs within the form */
.qesp-question-block textarea,
.qesp-answer-block input[type="text"] {
  /* Reuse base form styles */
  padding: 8px;
  background: #2e2e2e;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.qesp-question-block textarea {
  resize: vertical;
  min-height: 40px;
}

.qesp-collapse-btn {
  background: transparent;
  border: none;
  color: #ffca28; /* Same as title for consistency or choose another */
  cursor: pointer;
  padding: 2px 5px;
  font-size: 14px; /* Adjust as needed */
  margin-right: 8px; /* Space between collapse button and title */
}

.qesp-collapse-btn:hover {
  color: #fff;
}

.qesp-question-block.qesp-collapsed .qesp-question-content {
  display: none;
}

.qesp-drag-handle {
    cursor: grab;
    padding: 0 10px;
    font-size: 1.2em;
    color: #ccc;
    transition: color 0.2s;
    user-select: none; /* Prevent text selection when dragging */
}

.qesp-drag-handle:hover {
    color: #fff;
}
.qesp-drag-handle:active {
    cursor: grabbing;
}

/***************************************************************
 * Panel Resize Handle (Quiz Editor)
 ***************************************************************/
/* Prevent interactions during resize */
body.panel-resize-active #quiz-editor-sidepanel .lesp-body {
  pointer-events: none;
}
/***************************************************************
 * Custom HTML Editor Side Panel Layout
 ***************************************************************/
.html-editor-sidepanel {
  position: fixed;
  top: 10%;
  right: 0;
  width: 35%;
  height: 90%;
  background-color: #2e2e2e;
  box-shadow: -2px 0 6px rgba(0,0,0,0.4);
  
  /* Initial state for popupManager integration */
  transform: translateX(110%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease; 

  z-index: 999;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.html-editor-sidepanel.active {
  transform: translateX(0%);
  opacity: 1;
  visibility: visible;
}

/* HTML Editor Container */
.hesp-editor-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
}

/* HTML Editor Two-Panel Layout */
.hesp-editor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  flex: 1;
  overflow: hidden;
}

.hesp-inspector-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.hesp-panel-header {
  padding: 10px 15px;
  background: #2a2a2a;
  border-bottom: 1px solid #444;
}

.hesp-panel-header h3 {
  margin: 0;
  font-size: 1.1em;
  color: #fff;
}

/* Preview Overlay - Positioned outside side panel */
.hesp-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 35%; /* Default - will be overridden by JS when resizing */
  bottom: 0;
  z-index: 9999; /* Below side panel but above scene */
  pointer-events: none; /* Allow clicks to pass through except on interactive elements */
  transition: right 0.05s ease-out; /* Smooth transition during resize */
}

.hesp-overlay-header {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(30, 30, 30, 0.9);
  border-radius: 4px;
  pointer-events: auto;
}

.hesp-overlay-header p {
  margin: 0;
  color: #aaa;
  font-size: 0.85em;
}

/* HTML Editor Preview - Original positioning preserved */
.html-preview-container {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Allow clicks to pass through to scene */
}

/* Only enable pointer events on the actual HTML content */
.html-preview-container > * {
  pointer-events: auto;
}

/* Hide scene custom HTML elements when editor is active */
.html-editor-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Interactive element highlighting - ONLY in preview container */
.html-preview-container .html-editor-interactive {
  position: relative;
  outline: 2px dashed #00ff88 !important;
  outline-offset: 2px;
  cursor: pointer !important;
  transition: outline 0.2s ease, background-color 0.2s ease;
}

.html-preview-container .html-editor-interactive:hover {
  outline-color: #00ddff !important;
  background-color: rgba(0, 255, 136, 0.1) !important;
}

.html-preview-container .html-editor-interactive.selected {
  outline: 2px solid #ff6b00 !important;
  background-color: rgba(255, 107, 0, 0.15) !important;
}

/* HTML Editor Inspector */
.html-editor-inspector {
  background: #252525;
  padding: 15px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.hesp-inspector-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
}

.hesp-inspector-section:last-child {
  border-bottom: none;
}

.hesp-inspector-section h4 {
  margin: 0 0 10px 0;
  font-size: 0.95em;
  color: #ddd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hesp-attribute-preview {
  background: #1a1a1a;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-family: monospace;
  font-size: 0.85em;
  color: #aaa;
  word-wrap: break-word;
  max-height: 100px;
  overflow-y: auto;
}

.hesp-attribute-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-family: monospace;
  font-size: 0.85em;
  resize: vertical;
  margin-bottom: 10px;
}

.hesp-attribute-textarea:focus {
  outline: none;
  border-color: #00ff88;
}

.hesp-edit-btn,
.hesp-update-btn {
  background: #3a7bd5;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s ease;
}

.hesp-edit-btn:hover,
.hesp-update-btn:hover {
  background: #4a8be5;
}

.hesp-update-btn {
  background: #00aa6c;
}

.hesp-update-btn:hover {
  background: #00cc7e;
}

/* HTML Editor Mode Toggle Button */
.hesp-mode-toggle-btn {
  background: #5a4a8a;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.hesp-mode-toggle-btn:hover {
  background: #6a5a9a;
}

/* HTML Editor Save Container */
.hesp-save-container {
  padding: 15px;
  background: #2a2a2a;
  border-top: 1px solid #444;
  display: flex;
  justify-content: flex-end;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
  .html-editor-sidepanel {
    width: 40%;
  }
  /* Preview overlay right is now controlled by JS */
}

@media (max-width: 1024px) {
  .html-editor-sidepanel {
    width: 100%;
    transform: translateY(110%);
  }
  
  .html-editor-sidepanel.active {
    transform: translateY(0%);
  }
  
  .hesp-preview-overlay {
    right: 0;
    bottom: 50vh; /* Leave room for side panel at bottom on mobile */
  }
  
  /* Hide resize handle on mobile since panel is full width */
  .html-editor-sidepanel .panel-resize-handle {
    display: none;
  }
}

/***************************************************************
 * Panel Resize Handle (HTML Editor)
 ***************************************************************/
/* The handle itself inherits from learningEditorSidePanel.css */
/* Add HTML editor specific overrides here */

/* Prevent interactions during resize */
body.panel-resize-active .html-editor-sidepanel .lesp-body,
body.panel-resize-active .html-editor-sidepanel #hesp-body {
  pointer-events: none;
}

/* Hide resize handle on mobile for learning/quiz editors too */
@media (max-width: 768px) {
  .learning-editor-sidepanel .panel-resize-handle,
  #quiz-editor-sidepanel .panel-resize-handle {
    display: none;
  }
}


/* FRONTEND/src/css/eventChainModal.css */

.event-chain-modal-container {
    z-index: 1200;
}

.event-chain-modal-container,
.event-chain-modal-container.active {
    pointer-events: none;
}


#event-chain-modal .ecm-popup-content { 
    padding: 0;
    width: 90%;
    background-color: rgb(20, 20, 20);
    max-width: 600px;
    max-height: 85vh;
}

#event-chain-modal .popup-header {
    border-bottom: 1px solid var(--border-color, #444);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#event-chain-modal .popup-header h2 { margin: 0; font-size: 18px; }
#event-chain-modal .popup-header .close-btn { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

.ecm-popup-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px; 
}


.ecm-event-selector-container {
    padding: 15px;
    background: #333333;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.ecm-form-group { display: flex; flex-direction: column; gap: 6px; }
.ecm-form-group label { color: #fff; font-weight: 500; font-size: 13px; }
#ecm-event-type, .ecm-param-input {
    padding: 8px;
    border-radius: 4px;
    background: #2e2e2e;
    color: #fff;
    border: 1px solid #555;
    width: 100%;
    box-sizing: border-box;
}
.ecm-event-parameters {
    display: none; /* Hidden by default, shown when action selected */
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 4px;
    border: 1px solid #444;
}
.ecm-event-parameters.editing-params { /* Style when editing */
    outline: 2px solid var(--highlight-color, #ffca28);
}
.ecm-no-params-msg { color: #aaa; font-style: italic; text-align: center; margin: 5px 0; }
.ecm-param-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px; 
    margin-bottom: 12px;
    padding: 8px; 
    border: 1px solid #404040; 
    border-radius: 3px; 
    background-color: #333333; 
}
.ecm-param-input-group label { color: #ccc; font-size: 12px; margin-bottom: 2px; }
.ecm-param-textarea { resize: vertical; min-height: 40px; }

/* Custom Select Dropdown */
.ecm-custom-select {
    position: relative;
    width: 100%;
}
.ecm-select-selected {
    background-color: #2a2a2e;
    color: #fff;
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ecm-select-selected::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff;
    transition: transform 0.2s ease-in-out;
}
.ecm-select-selected.select-arrow-active::after {
    transform: rotate(180deg);
}
.ecm-select-items {
    position: absolute;
    background-color: #2a2a2e;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 1051; /* Higher than popupManager overlay */
    border: 1px solid #444;
    border-radius: 4px;
    max-height: 250px;
    display: flex;
    flex-direction: column;
}
.ecm-select-hide {
    display: none;
}
.ecm-event-search-wrapper {
    padding: 5px;
    border-bottom: 1px solid #444;
}
#ecm-event-search-custom {
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
    outline: none;
    border-radius: 3px;
}
#ecm-event-options-container {
    overflow-y: auto;
    flex-grow: 1;
}
.ecm-custom-select-optgroup {
    padding: 8px 12px;
    font-weight: bold;
    color: #aaa;
    font-size: 0.9em;
    text-transform: uppercase;
}
.ecm-custom-select-option {
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
}
.ecm-custom-select-option:hover {
    background-color: #575757;
}
.ecm-custom-select-option.selected {
    background-color: #007bff;
}

/* Styles for the new Object Input with Dropdown */
.ecm-object-input-wrapper {
    position: relative; /* For absolute positioning of the dropdown */
    display: flex;
    align-items: center;

}

.ecm-object-input-text {
    flex-grow: 1;
    border-right: none; /* Seamless with button */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.ecm-object-dropdown-btn {
    padding: 8px 10px;
    border: 1px solid #555;
    border-left: none;
    background-color: #383838;
    color: #ccc;
    cursor: pointer;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    line-height: 1; /* Align icon better */
}

.ecm-object-dropdown-btn:hover {
    background-color: #454545;
    color: #fff;
}

.ecm-object-dropdown-btn i {
    font-size: 12px;
    display: block; /* Helps with alignment */
}

.ecm-object-dropdown-list {
    position: absolute;
    top: 100%; /* Position below the input wrapper */
    left: 0;
    right: 0;
    background-color: #2e2e2e; /* Match input background */
    border: 1px solid #555;
    border-top: none; /* Avoid double border with input */
    border-radius: 0 0 4px 4px;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000; /* Ensure it appears above other elements */
}

.ecm-object-dropdown-item {
    padding: 8px 10px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
}

.ecm-object-dropdown-item:hover {
    background-color: #4a4a4a;
}

/* Dimmed style for hidden objects */
.ecm-object-dropdown-item.ecm-object-hidden {
    opacity: 0.4;
    font-style: italic;
    color: #999;
}

.ecm-object-dropdown-item.ecm-object-hidden:hover {
    background-color: #3a3a3a;
    opacity: 0.6;
}

/* No results message style */
.ecm-object-dropdown-item.ecm-no-results {
    cursor: default;
    font-style: italic;
    opacity: 0.6;
    pointer-events: none;
}

/* Styles for Boolean/Checkbox input group */
.ecm-param-checkbox-wrapper {
    display: flex; /* Align checkbox and label horizontally */
    align-items: center; /* Vertically align items in the center */
    gap: 8px; /* Space between checkbox and label */
}

.ecm-param-checkbox {
    width: auto; /* Let it size naturally or set a fixed size e.g., 16px */
    height: auto; /* e.g., 16px */
    margin: 0; /* Remove default margins if any */
    vertical-align: middle; /* Helps if not using flex align-items */
}

.ecm-param-checkbox-wrapper > label {
    margin-bottom: 0; /* Override default label margin-bottom from .ecm-param-input-group > label */
    font-weight: normal; /* Make it less prominent than main group labels if desired */
    color: #ddd; /* Ensure good contrast */
}

.ecm-event-edit-actions { display: flex; gap: 10px; margin-top: 10px; }
.ecm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}
.ecm-btn i { font-size: 12px; } /* Adjust icon size */
.ecm-btn-add { background-color: var(--button-primary-bg, #007bff); color: #fff; }
.ecm-btn-add:hover { background-color: var(--button-primary-hover-bg, #0056b3); transform: translateY(-1px); }
.ecm-btn-editing { 
    background-color: #ff6b35 !important; 
    color: #fff !important;
    box-shadow: 0 0 12px rgba(255, 107, 53, 0.6);
    animation: pulse-edit 2s infinite;
    font-weight: 600;
}
.ecm-btn-editing:hover { 
    background-color: #e55a2b !important; 
    box-shadow: 0 0 16px rgba(255, 107, 53, 0.8);
    transform: translateY(-1px); 
}
.ecm-btn-cancel { background-color: transparent; color: #fff; border: 1px solid #666; }
.ecm-btn-cancel:hover { background-color: #444; transform: translateY(-1px); }
.ecm-btn-camera-direction { background-color: #6c757d; color: #fff; }
.ecm-btn-camera-direction:hover { background-color: #5a6268; transform: translateY(-1px); }

/* Event List Area */
.ecm-event-list-container { margin-top: 15px; } /* Reduced from 20px to 15px */
.ecm-event-list-container > label { display: block; margin-bottom: 8px; color: #fff; font-size: 13px; font-weight: 500; }
.ecm-event-list {
    min-height: 100px; 
    max-height: 100%;
    overflow-y: auto;
    background: #3a3a3a;
    border-radius: 4px;
    padding: 10px;
    border: 1px solid #444;
}
.ecm-event-list-empty { color: #888; font-style: italic; text-align: center; padding: 15px; }

.ecm-event-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
    background: #454545;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 10px;
    gap: 6px;
    cursor: default; 
}
.ecm-event-item:last-child {
    margin-bottom: 0; /* No margin for the last item */
}
.ecm-event-item.editing {
    outline: 2px solid var(--highlight-color, #ffca28);
    background-color: #505050;
}

.ecm-event-item-header { display: flex; justify-content: space-between; align-items: center; }
.ecm-event-item-title { color: #fff; font-size: 14px; font-weight: 500; flex-grow: 1; word-break: break-word;}
.ecm-event-item-actions { display: flex; gap: 8px; flex-shrink: 0; /* Prevent actions from shrinking */ }
.ecm-event-item-actions button, .ecm-drag-handle {
    background: none; border: none; color: #ccc; cursor: pointer; padding: 0;
    font-size: 14px; line-height: 1;
}
.ecm-event-item-actions button:hover, .ecm-drag-handle:hover { color: var(--highlight-color, #ffca28); }

.ecm-drag-handle {
    cursor: grab;
}
.ecm-drag-handle:active {
    cursor: grabbing;
}

.ecm-event-item-params { border-top: 1px solid #5a5a5a; padding-top: 8px; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; word-break: break-all; }
.ecm-param-preview { font-size: 12px; color: #ccc; }
.ecm-param-name { font-weight: 500; color: #aaa; margin-right: 5px; }
.ecm-param-value { color: #ddd; }


.popup-footer {
    border-top: 1px solid var(--border-color, #444);
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #2c2c2c;
    border-bottom-left-radius: var(--popup-border-radius, 8px);
    border-bottom-right-radius: var(--popup-border-radius, 8px);
}
.ecm-btn-save { background-color: var(--button-confirm-bg, #28a745); color: #fff; }
.ecm-btn-save:hover { background-color: var(--button-confirm-hover-bg, #218838); transform: translateY(-1px); }


/* Scrollbar styling */
.ecm-popup-body::-webkit-scrollbar,
.ecm-event-list::-webkit-scrollbar { width: 8px; }
.ecm-popup-body::-webkit-scrollbar-track,
.ecm-event-list::-webkit-scrollbar-track { background: #2e2e2e; }
.ecm-popup-body::-webkit-scrollbar-thumb,
.ecm-event-list::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}
.ecm-popup-body::-webkit-scrollbar-thumb:hover,
.ecm-event-list::-webkit-scrollbar-thumb:hover { background: #666; }

/* For Firefox */
.ecm-popup-body, 
.ecm-event-list {
  scrollbar-width: thin;
  scrollbar-color: #555 #2e2e2e;
}


/* Anchored version for side-panel like usage */
#event-chain-modal.anchored-right {
    justify-content: flex-end; /* Align to the right */
    align-items: stretch; /* Stretch to full height */
    pointer-events: none; /* Allow clicks to go through the container */;
}

#event-chain-modal.anchored-right .ecm-popup-content {
    top: 10%;
    width: 100%;
    height: 90%;
    max-height: 100%;
    border-radius: 0;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    pointer-events: auto; /* Re-enable pointer events for the content */
}

@media(max-width: 768px) {
  #event-chain-modal.anchored-right .ecm-popup-content {
      max-width: 100%; /* Take full width on smaller screens */
  }
}

.ecm-paste-chain-container {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: #333333;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
}

#ecm-paste-chain-input {
    flex-grow: 1;
    background: #2e2e2e;
    color: #fff;
    border-color: #555;
}

.ecm-btn-parse-compact {
    padding: 6px 12px;
    background-color: #4a4a4a;
    color: #ddd;
}

.ecm-btn-parse-compact:hover {
    background-color: #555;
}

.ecm-separator {
    height: 1px;
    background-color: #444;
    border: none;
    margin: 15px 0;
}

@keyframes pulse-edit {
    0% { box-shadow: 0 0 8px rgba(255, 107, 53, 0.5); }
    50% { box-shadow: 0 0 16px rgba(255, 107, 53, 0.8); }
    100% { box-shadow: 0 0 8px rgba(255, 107, 53, 0.5); }
} 
/* 
  DraggableListManager.css
  Styles for the generic draggable list manager.
*/

/* Applied to the item being dragged */
.dragging {
  opacity: 0.5;
  background: #cce5ff; /* A light blue to indicate dragging */
}

/* Style for the drop indicator when dropping ABOVE the target item */
.drop-indicator-above {
  border-top: 2px solid #007bff; /* Blue solid line */
  box-shadow: 0 -4px 5px -3px rgba(0, 123, 255, 0.5); /* A subtle glow */
  transition: border-top 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

/* Style for the drop indicator when dropping BELOW the target item */
.drop-indicator-below {
  border-bottom: 2px solid #007bff; /* Blue solid line */
  box-shadow: 0 4px 5px -3px rgba(0, 123, 255, 0.5); /* A subtle glow */
  transition: border-bottom 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
} 
/* FRONTEND/src/css/pdfUIManager.css */

#cpm-media-container .pdf-controls {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  flex-shrink: 0;
  padding: 8px;
  min-height: 10%;
  box-sizing: border-box;
  background-color: rgba(50, 50, 50, 0.9); 
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
  text-align: center;
  color: #eee; 
  z-index: 20;
}

.pdf-nav-button {
  padding: 5px 12px;
  margin: 0 5px;
  background-color: #555;
  border: 1px solid #777;
  color: #eee;
  border-radius: 4px;
  cursor: pointer;
}

.pdf-nav-button:disabled {
  background-color: #444;
  color: #888;
  cursor: not-allowed;
}

.pdf-nav-button svg {
  width: 10px;
  height: 10px;
  vertical-align: middle;
}

#cpm-media-container .pdf-canvas {
  margin: auto; 
}

#cpm-media-container .pdf-loading-container {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px 20px;
  background-color: rgba(20, 20, 20, 0.9); /* Dark solid background */
  color: white;
  border-radius: 5px;
  z-index: 3000; /* Highest z-index */
  width: 80%;
  max-width: 300px;
  text-align: center;
}

.pdf-progress-bar {
  width: 100%;
  height: 10px;
  background-color: #555;
  border-radius: 5px;
  overflow: hidden; 
  margin-bottom: 8px;
}

.pdf-progress-bar-fill {
  width: 0%; 
  height: 100%;
  background-color: #4CAF50; 
  border-radius: 5px;
  transition: width 0.1s linear;
}

.pdf-loading-text {
  font-size: 0.9em;
}

.pdf-error-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px 20px;
  background-color: rgba(150, 0, 0, 0.85);
  color: #ffdddd;
  border-radius: 5px;
  z-index: 999; /* Much higher z-index */
  font-size: 1.1em;
  text-align: center;
}

.cpm-pdf-viewer-container:fullscreen {
  background: #222;
  z-index: 9999;
}

