:root {
    --primary-color: #0066B3;  /* CremSolutions blue */
    --secondary-color: #4CAF50;
    --background-color: #FFFFFF;
    --text-color: #1D1D1F;
    --secondary-text: #86868B;
    --card-background: #F5F5F7;
    --hover-color: #005291;
    --border-color: rgba(0,0,0,0.1);
    --success-color: #34C759;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    margin: 0;    
}

/* Only add padding when dashboard is active */
body.dashboard-active {
    padding-top: 64px;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

.hero-logo {
    height: 80px;
    width: auto;
    margin-bottom: 2rem;
}

/* a reusable “max-width + centered” container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 2rem;   /* horizontal gutters */
}


nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    height: 64px;
}

.welcome-page nav,
.dashboard nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Welcome Page Centering Fix */
.welcome-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%);
    padding: 2rem;
    z-index: 1; 
}  

.nav-inner {
  max-width: 960px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

/* override container centering when inside nav */
nav .container {
  margin: 0;  
}



.welcome-content {
    max-width: 600px;
    text-align: center;
    /* Add some margin to account for the fixed nav if needed */
    margin-top: 0; /* Half of nav height to perfectly center */
    padding-top: 64px;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-text);
    margin-bottom: 2rem;
}

/* Dashboard */
.dashboard {
    display: none;
    padding: 120px 2rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 140;
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Launch Container */
.launch-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.launch-content {
    padding: 2rem;
}

/* Launch Button Container */
.launch-button-container {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
}

.primary-button {
    min-width: 200px;
    font-size: 1.2rem;
    padding: 1.2rem 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Launch Buttons Grid */
.launch-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.launch-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--card-background);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.launch-btn.active {
    border-color: var(--primary-color);
    background: rgba(0, 102, 179, 0.1);
}

.launch-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.launch-btn:hover .launch-icon {
    transform: scale(1.1);
}

/* URL Section */
.url-section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
}

.url-section.visible {
    opacity: 1;
}

.url-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.url-container #streaming-url {
    flex: 1;
    margin-right: 0; /* override existing margin-right: 10px */
}

#copy-url-btn {
    flex-shrink: 0;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
    background: var(--card-background);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#copy-url-btn:hover {
    background: #e5e5e7;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#copy-feedback {
    display: none;
    background: transparent;
    color: #22c55e;         /* muted green, readable on white */
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 8px;
    padding: 0;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.url-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: monospace;
    margin-bottom: 1rem;
    background: white;
    color: var(--text-color);
    cursor: text;
    font-size: 0.9rem;
}

.url-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#streaming-url {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    margin-right: 10px;
}


.url-help {
    margin-top: 10px;
    color: #757575;
    font-size: 12px;
}


.error-section {
    background-color: #ffebee;
    border: 1px solid #ef5350;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-content {
    display: flex;
    align-items: center;
}

.error-icon {
    color: #d32f2f;
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}

#error-message {
    margin: 0;
    color: #c62828;
    font-size: 14px;
    flex-grow: 1;
}

/* Help Section */
.help-section {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.help-toggle {
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.help-arrow {
    transition: transform 0.3s ease;
}

.help-toggle.active .help-arrow {
    transform: rotate(180deg);
}

.help-content {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.help-content.show {
    display: block;
    opacity: 1;
    max-height: 500px; /* Adjust max height as needed */
}


.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-background);
    border-radius: 12px;
    margin: 1rem 0;
}

.help-item {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.help-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.help-item h5 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.help-list li {
    padding-left: 1.25rem;
    position: relative;
    margin: 0.4rem 0;
    color: var(--secondary-text);
    font-size: 0.85rem;
    line-height: 1.4;
}

.help-list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Loading States */
.loading-message {
    display: none;
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 102, 179, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--card-background);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    animation: progress 2s ease infinite;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    background: var(--card-background);
    padding: 3rem 2rem 1rem;
    color: var(--secondary-text);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-section {
    font-size: 0.9rem;
}

.footer-section h5 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin: 0.5rem 0;
}

.footer-section a {
    color: var(--secondary-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.8rem;
}


/* Footer Bar */
.site-footer {
    margin-top: 4rem;
    background: var(--primary-color);
    color: white;
}

.footer-bar {
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Help Section Styles */
.help-section {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.help-toggle {
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.1rem;
}

.help-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1rem;
}

.help-content.show {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

.help-step {
    margin: 2rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.help-step:last-child {
    border-bottom: none;
}

.help-step h4 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.help-step p {
    color: var(--secondary-text);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.help-step ul {
    list-style: none;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.help-step li {
    position: relative;
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: var(--secondary-text);
}

.help-step li::before {
    content: "-";
    position: absolute;
    left: -1rem;
    color: var(--primary-color);
}

/* Buttons */
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--primary-color);
    color: white;
}

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

.secondary-button {
    background: var(--card-background);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-button:hover {
    background: #e5e5e7;
}



.action-message {
    font-size: 1.1rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.link-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Launch Button Container */
.launch-button-container {
    text-align: center;
    padding: 2rem 0;
    margin: 2rem auto;
    max-width: 300px;
}

.launch-button-container .primary-button {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.launch-button-container .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    display: none;
}

.launch-button-container .primary-button.loading .loading-spinner {
    display: block;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.user-role-info {
  font-size: 1rem;
  color: var(--primary-color); /* CremSolutions blue */
  font-weight: 700;            /* make it bold */
  margin-top: 10px;
}

.app-description {
  font-size: 1rem;               /* keep whatever size you like */
  color: var(--primary-color);   /* CremSolutions blue */
  font-weight: 700;              /* make it bold */
  margin-bottom: 1rem;           /* optional spacing */
}

/* Responsive Design */
@media (max-width: 768px) {
    .launch-buttons {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .help-grid {
        grid-template-columns: 1fr;
    }

    .url-buttons {
        flex-direction: column;
    }

    h1 {
        font-size: 2.5rem;
    }

    .app-title {
        font-size: 2rem;
    }

    .logo-img {
        height: 30px;
    }

    .hero-logo {
        height: 60px;
    }
}

/* Center the modal overlay and content */
#email-modal.modal {
    position: fixed !important;
    top: 0 !important; 
    left: 0 !important;
    width: 100vw !important; 
    height: 100vh !important;
    background: rgba(30,30,30,0.5) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
}

/* Show modal only when explicitly shown via JavaScript */
#email-modal.modal.show,
#email-modal.modal[style*="display: block"] {
    display: flex !important;
}

/* Ensure modal is hidden by default */
#email-modal.modal[style*="display: none"] {
    display: none !important;
}

/* Modal content box */
#email-modal .modal-content {
    background: #fff;
    padding: 2rem 2.5rem;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 400px;
    max-width: 90vw;
    text-align: center;
    position: relative;
}

/* Email input field - shorter */
#email-modal input[type="email"] {
    width: 280px;
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    text-align: center;
}

#email-modal input[type="email"]:focus {
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.1);
}

/* Horizontal button container - FORCE HORIZONTAL LAYOUT */
#email-modal .modal-content {
    text-align: center;
}

div.button-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 1rem !important;
    width: 100% !important;
}

/* Button styles - SIMPLIFIED */
.button-container button {
    flex: 0 0 auto !important;
    width: 110px !important;
    padding: 12px 16px !important;
    border: none !important;
    border-radius: 6px !important;
    background: #0078d4 !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin: 0 !important;
}

.button-container button.secondary {
    background: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
}

#email-modal .modal-content .button-container .action-button:hover {
    background: #005fa3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,120,212,0.2) !important;
}

#email-modal .modal-content .button-container .action-button.secondary:hover {
    background: #e5e7eb !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}

#email-modal .error-section {
    margin-top: 0.8rem;
    color: #d32f2f;
    font-size: 0.95rem;
    text-align: center;
}

/* ABSOLUTE FINAL OVERRIDE - HORIZONTAL BUTTONS */
#email-modal .modal-content .button-container,
#email-modal .button-container,
.button-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 1rem 0 !important;
    width: 250px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

#email-modal button,
.modal button,
.button-container button {
    width: 110px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block !important;
    float: none !important;
    clear: none !important;
    position: static !important;
}

/* Force specific button positioning */
.button-container button:first-child {
    margin-right: 20px !important;
}

.button-container button:last-child {
    margin-left: 0 !important;
}
/**************************************/
/* --- Test/Prod toggle (visual only) --- */
/* === Environment dropdown toggle === */
.env-dropdown {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 1rem 0 1.5rem 0;
  width: 100%;
}

/* Toggle button */
/* --- Two-state Prod/Test toggle, visually identical to Continue button --- */
.env-toggle-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0 1.5rem 0;
}

.env-toggle-btn {
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  padding: 0.9rem 2rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 140px;
}

/* Match hover look of Continue */
.env-toggle-btn:hover {
  background: var(--hover-color);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Active (Test) state — same shape, just different color */
.env-toggle-btn.test {
  background: #f59e0b; /* warm amber tone to signal non-prod */
}

.env-toggle-btn.test:hover {
  background: #d97706;
}


/* Center wrapper */
.env-dropdown-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 1rem 0 1.5rem 0;
  width: 100%;
}

/* Make env button visually identical to Continue */
.env-btn {
  /* inherits .action-button + .primary-button from your theme */
  min-width: 150px;               /* similar width feel */
  padding: 0.9rem 2rem;           /* same vertical rhythm */
  font-weight: 700;               /* same weight as Continue */
}

/* Dropdown menu: light card w/ shadow */
.env-menu {
  position: absolute;
  top: calc(100% + 10px);
  z-index: 1000;
  display: none;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  overflow: hidden;
  min-width: 180px;
}

/* Center the menu under the button */
.env-dropdown-wrap .env-menu {
  left: 50%;
  transform: translateX(-50%);
}

/* Items */
.env-item {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #fff;
  color: var(--text-color);
  text-align: center;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.env-item:hover {
  background: var(--card-background);
}

/* Show/Hide */
.env-menu.show {
  display: block;
}

/* Optional: when Test selected, tint button to secondary (green).
   Remove if you want it always blue like Continue. */
.env-btn.test {
  background: var(--secondary-color);
}
.env-btn.test:hover {
  background: #3ea045;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center; /* center under the title */
  margin-top: .25rem;
}

.env-dropdown--small .env-btn {
  padding: .5rem .9rem;
  font-size: .9rem;
  border-radius: 8px;
}

.env-dropdown--small .env-menu {
  min-width: 150px;
}

/* Center/spacing when the dropdown lives above the launchers */
.env-dropdown--top {
  display: flex;
  justify-content: center;
  margin: 0 auto 0.75rem;   /* was around 1.25rem – raise it a bit */
  position: relative;
  top: -4px;                /* nudges the button upward ~2–3 mm */
}

.env-btn {
  /* same visual as your Continue button */
  min-width: 150px;
  padding: 0.9rem 2rem;
  font-weight: 700;
}


