﻿/* Page-specific styling */
html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0 0 40px; /* bottom = footer height */
}

.footer {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 40px;
    width: 100%;
}

.padding {
    padding: 15px;
}

#notification-popup.MessageBanner {
    position: absolute;
    left: 0px;
    bottom: 0px;
    text-align: left;
    height: inherit;
    min-width: inherit;
}

#notification-popup .MessageBanner-text {
    margin: 0;
    padding: 18px 15px;
    min-width: inherit;
}

/* Added for hover popup */
.popup-container {
    position: relative;
    display: inline-block;
}

#popup-menu {
    display: none;
    position: absolute;
    z-index: 1000;
    background-color: white;
    border: 1px solid #ddd;
    padding: 10px;
}

.popup-container:hover #popup-menu {
    display: block;
}

.box {
    border: 1px solid black;
    margin: 10px;
    padding: 3px 3px 10px 3px !important; /* top right bottom left */
    cursor: pointer;
    border-radius: 5px;
    font-size: 11px;
    height: auto !important; /* Allow dynamic height */
    min-height: 15px; /* Ensure a minimum height */
    transition: height 0.3s ease; /* Animate height change */
    padding: 15px; /* Keep increased padding */
    overflow: visible; /* Ensure content is fully displayed */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words properly */
}

.box.expanded {
    height: auto !important; /* Ensures expanded boxes can grow */
}

.box:hover {
    background-color: #f5f5f5;
}

.nav-arrows {
    display: none; /* Hide by default */
}

.arrow {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    margin: 0 3px; /* Decrease margin to bring arrows closer */
}


.left-double-arrow, .right-double-arrow {
    margin: 0 4px; /* Adjust the pixel values as needed */
}

.status-icon {
    font-size: 1.5em;  /* Makes the icon larger */
    margin-right: 5px; /* Adds space between icon and acronym */
    vertical-align: middle; /* Aligns with text */
}

/* Summary Area Styling */
.summary-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #FCFAF4;
    padding: 5px 10px; /* Reduce padding */
    border-radius: 8px;
    border: none;
    margin: 0;
    text-align: center;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
   /* padding-bottom: 0px; /* ⬅️ Increased bottom padding to fit controls */
}

.summary-controls {
    display: flex;
    justify-content: flex-end; /* pushes controls neatly to the right */
    align-items: center;
    gap: 10px; /* spacing between slider and button */
    width: 100%; /* Use full width */
    padding: 1px 15px; /* ⬅️ Adjust padding */
    background-color: #F4F0F7; /* slightly darker shade than summary area */
    border-radius: 0 0 8px 8px; /* round bottom corners */
    position: relative; /* Keep inside the summary section */
    top: 5px; /* ⬅️ Position just under summary items */
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.slider-group {
    display: flex;
    align-items: center; /* vertically aligns slider and label */
    justify-content: flex-start; /* aligns group to the left side */
    gap: 8px; /* neat spacing between slider and label */
}

.slider-label {
    font-size: 12px;
    color: #4A4A4A;
    /*margin-left: 8px; /* adjust spacing as needed */
    user-select: none;
}


input:checked + .slider {
    background-color: #6D0887;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.table-button {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    bottom: -5px; /* Move down slightly to prevent cutoff */
}

/* ✅ Ensure the button icon displays correctly */
.table-button img {
    width: 24px; /* Adjust size as needed */
    height: 24px;
}

.table-button:hover {
    filter: brightness(1.2);
}
/* End Summary Area Styling */


/* Pushes content below */
#content-main {
    margin-top: 150px; /* or even 220px depending on how tall your toggle + form is */
    overflow-y: auto;    
    padding-left: 0; /* Ensures no left margin */
    padding-right: 0; /* Ensures no right margin */
}

/*  
#manual-license-inner {
    display: none !important;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

#manual-license-inner.open {
    display: block !important;
    opacity: 1 !important;
    max-height: 500px !important;
    overflow: visible;
}

#manual-license-section {
    background-color: #FCFAF4;
    border-radius: 0 0 8px 8px;
    padding: 10px 15px;
    margin: 0;
    text-align: center;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05); /* subtle inset shadow 
}*/

/*#manual-license-inner input[type="text"] {
    width: 80%;
    padding: 6px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-bottom: 8px;
}

#validate-license-button {
    background-color: #6D0887;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 4px;
}

#validate-license-button:hover {
    background-color: #5a0772;
}
  
#manual-license-section {
    margin-bottom: 10px;
}*/



/* ACROWizard Header */
.summary-header {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    padding: 5px 0;
    margin-bottom: 10px;
    color: #2b579a; /* Darker blue */
    width: 100%;
}

/* Ensure all circles are in a single row */
.summary-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 2px 0px; /* Reduce padding */
    gap: 4px; /* Reduce space between circles */
}

/* Ensure all items are evenly aligned */
.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
    min-width: 70px; /* Reduce min width to fit */
    position: relative; /* ✅ Added to position underline */
}

.summary-item::after {
    content: '';
    position: absolute;
    bottom: -4px; /* adjust distance from circle */
    left: 50%;
    transform: translateX(-50%);
    width: 0; /* hidden by default */
    height: 3px; /* thickness of underline */
    background-color: #FFD700; /* yellow underline */
    transition: width 0.3s ease; /* smooth transition */
}

.summary-item:hover {
    background-color: transparent !important;
}

.summary-item.active::after {
    width: 80%; /* visible when active */
}

.summary-item:focus,
.summary-item:active {
    outline: none; /* Removes browser default outline */
    background-color: transparent; /* Ensures no background appears */
}

/* Numbers Inside Circles */
.summary-value {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    /*background-color: #6D0887;
    color: white;*/
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Ensure labels wrap without pushing circles */
.summary-label {
    font-size: 10px;
    font-weight: normal;
    white-space: pre-wrap;
    text-align: center;
    line-height: 1.2;
    max-width: 80px;
    min-height: 30px; /* Ensures all labels take up the same space */
    color: #4A4A4A; /* Dark Gray */
}

/* Active summary circle (selected filter) */
.summary-item.active .summary-value {
    color: #6D0887; /* purple text for active */
    background-color: transparent; /* no background */
}

/* Inactive summary circles */
.summary-item .summary-value {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px; /* Ensures circle remains */
    height: 40px;
    line-height: 40px;
    border-radius: 50%; /* Keeps it round */
    background-color: #F4F0F7; /* Slightly darker than summary area */
    color: #6D0887; /* Purple text */
    border: 1px solid #6D0887; /* ⬅️ border on inactive circles */
}

/* Optional: subtle border to highlight circle */
.summary-value {
    border: 1px solid transparent;
}

.summary-item.active .summary-value {
    background-color: #E4DEF2; /* Darker shade for active */
    color: #6D0887; /* Keep purple text */
    border: 1px solid #6D0887; /* ⬅️ border on inactive circles */
}



/* Clickable Filters */
.clickable {
    cursor: pointer;
}

.clickable:hover {
    background-color: #e0e0e0;
}

/* ✅ Floating AI Definition Popup */
.lookup-popup {
    position: absolute;
    background: #F4F0FF; /* Light purple from summary area */
    color: #4A235A; /* Dark purple text */
    border: 1px solid #D8C2F0; /* Subtle purple border */
    border-radius: 8px;
    padding: 12px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    max-width: 300px;
    z-index: 9999;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.2s ease-in-out;
}

.lookup-popup-content {
    text-align: left;
}


/* ✅ Popup Title */
.lookup-popup h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #6A0DAD; /* Same as summary text for circles */
    font-weight: bold;
}
  

.lookup-popup-content p {
    font-size: 14px;
    margin-bottom: 10px;
}

.insert-definition-button,
.close-popup-button {
    background: #0078D4;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    margin: 5px;
}

.insert-definition-button:hover,
.close-popup-button:hover {
    background: #005A9E;
}



/* ✅ Styles for Clickable Definitions in the Floating Popup */
/* - Displays definitions in a list format */
/* - Allows users to highlight and select a definition */
/* - Highlights the selected definition in blue */

.definition-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.definition-item {
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    color: #2E1A47; /* Dark text for readability */
}

.definition-item:hover {
    background-color: #444; /* Darker hover effect */
    color: #ffcc00; /* Highlight color */
}

.definition-item.selected {
    background: #0078D4;
    color: white;
    font-weight: bold;
}

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

/* ✅ Position the logo inside the summary area */
.app-header {
    display: flex;
    justify-content: flex-start; /* Align to the left */
    align-items: center;
    width: 100%;
    padding: 5px 15px;
    background: transparent;
}

/* ✅ Adjust Logo Size */
.app-logo {
    height: 30px; /* Adjust size as needed */
    width: auto;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none; /* Prevents blocking interactions */
    z-index: 1000;
    max-width: 200px; /* Set a reasonable max width */
    white-space: normal; /* Allows text to wrap */
    word-wrap: break-word; /* Ensures long words don't overflow */
    text-align: center; /* Center-aligns text */
}

/* Fade-in and slide-down animation for license activation */
@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#license-status-message {
    display: none;
    margin: 10px 0 15px 0;
    padding: 10px 12px;
    background-color: #e6f4ea;
    color: #217346;
    font-weight: bold;
    font-size: 14px;
    border-radius: 8px;
    text-align: center;
    animation: fadeSlideIn 0.6s ease forwards;

    /* 👇 Ensure it's in normal flow, not floating above header */
    position: static !important;
    width: auto !important;
    max-width: 100%;
    z-index: 1 !important;
    box-sizing: border-box;
}

#footer-links {
  text-align: center;
  width: 100%;
  margin: 20px 0 10px 0;
}




body.dark-mode {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

body.dark-mode .box {
  background-color: #2a2a2a;
  border-color: #555;
  color: #f0f0f0;
}

body.dark-mode .status-icon {
  color: #a0ffb0;
}

body.dark-mode .summary-item {
  background-color: #444;
  color: #fff;
  border-color: #666;
}

body.dark-mode a {
  color: #9ecbff;
}

body.dark-mode .summary-item {
  background-color: #444;
  color: #f0f0f0;
  border: 1px solid #666;
}

body.dark-mode .summary-item.active {
  background-color: #666;
  color: #fff;
}

body.dark-mode .tooltip {
  background-color: #2a2a2a;
  color: #fff;
  border: 1px solid #555;
}

body.dark-mode .summary-container {
  background-color: #2a2a2a;
}

body.dark-mode .summary-controls {
  background-color: #333;
}


body.dark-mode .summary-value {
  background-color: #555;
  color: #fff;
  border: 1px solid #aaa;
}

body.dark-mode .summary-item.active .summary-value {
  background-color: #777;
  color: #fff;
}

/* Dark mode cleanup for summary circles */
body.dark-mode .summary-item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 🌓 Improved contrast for valid dictionary word bubbles in dark mode */
body.dark-mode .bubble.valid-word {
  background-color: #facc15 !important;  /* amber-400 tone */
  color: #1a1a1a !important;             /* near-black text */
  border: 1px solid #d6a600 !important;  /* subtle golden border */
}

.bubble.valid-word,
.box.valid-word,
.box[data-valid-word="true"] {
  background-color: yellow;
  color: #000;
}



@media (prefers-color-scheme: dark) {
  .bubble.valid-word,
  .box.valid-word, 
  .box[data-valid-word="true"] {
    background-color: #facc15 !important;  /* amber-400 tone */
    color: #1a1a1a !important;             /* near-black text */
    border: 1px solid #d6a600 !important;  /* subtle golden border */
  }
}