/* style.css */

@import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Teko&display=swap');


/* Force Pickr color picker dark mode to match floaty window */
.pickr .pcr-app,
.pcr-app.color-picker-always-visible,
.color-picker-always-visible.visible {
    background: #333 !important;
    color: #fff !important;
}


body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: rgb(102, 102, 102);
    overflow: hidden;  /* Prevent window from scrolling */
    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE/Edge */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    font-size: 18px;
  }
  
  #app-container {
    background-color: white;
    border-radius: 30px 30px 10px 10px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.6);
    width: calc(100% - 15px);   /* Adds 10px margin left + right */
    height: calc(100% - 15px);  /* Adds 10px margin top + bottom */
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

#header {
    padding: 5px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    background-color: #ffffff;
    color: #000000;
    height: 20px;
    border-bottom: 0px solid #000000;
}


#content {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 95px); /* Adjusted height to account for title and header */
    overflow: hidden;
    position: relative;
}

#left-panel {
    flex: 1;
    min-width: 300px;
    padding: 10px;
    overflow: hidden;
}

#splitter {
    width: 5px;
    background-color: #ccc;
    cursor: col-resize;
    position: relative;
    z-index: 1;
}

#right-panel {
    flex-basis: 25%;
    min-width: 400px;
    padding: 10px;
    border-left: 2px solid #ccc;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#right-panel-buttons {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    min-height: 50px;
    align-items: center;
}

#right-panel-buttons button {
    width: 50px;
    height: 50px;
    color: #ffffff;
    background: #555555;
    border: 1px solid #ccc;
    border-radius: 8px;
    opacity: 0.9;
    transition: all 0.2s ease;
}

#right-panel-buttons button:disabled {
    opacity: 0.4;
    background: #777777;
    color: #cccccc;
    cursor: not-allowed;
}

#right-panel-buttons button:not(:disabled):hover {
    background: #666666;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* Charge and multiplicity display */
.charge-mult-display {
    width: 80px;
    height: 40px;
    background-color: #666666;
    border: 1px solid #999;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.charge-value, .mult-value {
    height: 100%;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
}

.separator {
    width: 1px;
    height: 70%;
    background-color: #888888;
    flex-shrink: 0;
}

.charge-value:hover, .mult-value:hover {
    background-color: #777777;
}

.charge-mult-display .editable.editing {
    background-color: #888888;
    outline: none;
}

/* Custom text selection styling */
.charge-mult-display .editable.editing::selection {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
}

.charge-mult-display .editable {
    transition: all 0.2s ease;
}

/* End of charge and multiplicity display styling */

/* User modified and error states for charge/multiplicity */
.charge-mult-display .user-modified {
    color: #FFA500; /* Orange */
}

.charge-mult-display .error {
    color: #FF4444; /* Red */
}

.scroll-inner {
    flex: 1 1 auto;
    overflow-y: scroll;             /* scroll happens here now */
    max-height: 100%;            /* limit height to panel */
    padding-right: 12px;         /* add room for scrollbar */
  scrollbar-gutter: stable;
}

.scroll-inner::-webkit-scrollbar {
	width: 15px;
}


.scroll-inner::-webkit-scrollbar-track {
	background: #f0f0f0;
}

.scroll-inner::-webkit-scrollbar-thumb {
	background-color: #aaa;
	border-radius: 4px;
	border: 2px solid #f0f0f0;
}


#viewer {
    width: 100%;
    height: 80%;
    position: relative; /* Make sure it stays in the correct position */
    transition: height 0.3s ease; /* Smooth transition for height changes */
}


#treeContainer {
    background-color: #ffffff;
    padding: 0px;
    border-radius: 5px;
}


.orbitron-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: #6b6b6b5b;
    padding: 2px 6px;
    margin: 0;
    line-height: 1.2;
}


.orbitron {
font-family: 'Orbitron', sans-serif;
}

#CurrentFile {
    position: relative;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 10px auto 8px;
    color: #333;
    transition: all 0.2s ease;
    width: calc(100% - 24px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#CurrentFile .filename-container {
    display: flex;
    width: 100%;
    height: 100%;
}

#CurrentFile .filename-prefix {
    /* Fixed width label */
    width: 60px;
    flex-shrink: 0;
    /* Clear padding and alignment */
    padding: 8px 10px;
    text-align: center;
    /* Styling */
    background-color: #e8e8e8;
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    /* Prevent selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Rounded left corners only */
    border-radius: 6px 0 0 6px;
    border: 1px solid #e0e0e0;
    border-right: none;
    transition: all 0.2s ease;
}

#CurrentFile .filename-prefix:hover {
    background-color: #dadada;
    color: #444;
}

#CurrentFile .filename-content {
    /* Take remaining space */
    flex-grow: 1;
    /* Handle text overflow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Alignment */
    padding: 8px 12px;
    text-align: center; /* Center the text */
    /* By default, disable text selection until editing */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: pointer;
    /* Styling */
    border: 1px solid #e0e0e0;
    /* Rounded right corners only */
    border-radius: 0 6px 6px 0;
    background-color: #f9f9f9;
}

#CurrentFile .filename-content:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

#CurrentFile .filename-content.editing {
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
    border-color: #a8d1f0;
    /* Enable text selection only when editing */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    cursor: text;
}

.vertical-line {
    width: 2px;
    height: 50px; /* or whatever height you need */
    background-color: rgb(255, 255, 255);
    margin: 0 10px; /* spacing around the line */
}

#right-panel-bottom-placeholder {
    height: 100px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    margin-top: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.2em;
}

#donation-banner {
    height: auto;
    min-height: 80px;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    border-radius: 10px;
    margin: 15px 7px 10px 7px;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444444;
    font-size: 1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#donation-banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #555555, #777777, #555555);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}

#donation-banner.hidden {
    display: none;
}

.donation-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.donation-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

.donation-close .material-symbols-outlined {
    font-size: 18px;
    color: #3a587a;
}

@keyframes shimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

#donation-banner:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.donation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 12px;
    gap: 10px;
}

.donation-left {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.donation-icon {
    font-size: 30px;
    color: #555555;
    background-color: rgba(85, 85, 85, 0.1);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variation-settings: 'FILL' 1;
    box-shadow: 0 0 0 rgba(85, 85, 85, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(85, 85, 85, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(85, 85, 85, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(85, 85, 85, 0);
    }
}

.donation-text-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.donation-title {
    font-weight: 700;
    font-size: 1em;
    color: #444444;
}

.donation-description {
    font-size: 0.85em;
    color: #666666;
    line-height: 1.3;
}

.donation-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    justify-content: center;
}

.donation-benefit {
    display: flex;
    align-items: center;
    font-size: 0.8em;
    background-color: rgba(85, 85, 85, 0.08);
    color: #444444;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.benefit-icon {
    font-size: 14px;
    margin-right: 4px;
    color: #555555;
}

.donation-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.donation-button-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.donation-button {
    display: flex;
    align-items: center;
    background-color: #555555;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin: 10px auto;
    min-width: 140px;
    justify-content: center;
}

.donation-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

.donation-button:hover {
    background-color: #444444;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.donation-button:hover::before {
    left: 100%;
}

.donation-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.paypal-logo {
    height: 20px;
    margin-right: 8px;
    margin-bottom: 1px;
}

.donation-thanks {
    font-size: 0.75em;
    color: #efefef;
    font-style: italic;
    margin-left: 8px;
}

.donation-button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.pro-button {
    display: flex;
    align-items: center;
    background-color: #666666;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin: 5px auto;
    min-width: 140px;
    justify-content: center;
    opacity: 0.6;
    cursor: not-allowed;
}

.pro-button:disabled {
    cursor: not-allowed;
}

.pro-icon {
    font-size: 20px;
    margin-right: 8px;
    color: #ffcc00;
}

.pro-coming-soon {
    font-size: 0.75em;
    color: #efefef;
    font-style: italic;
    margin-left: 8px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 700px) {
    .donation-content {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
    }
    
    .donation-left {
        flex-direction: column;
    }

    .donation-benefits {
        justify-content: center;
    }
    
    .donation-actions {
        margin-top: 12px;
    }
    
    .donation-icon {
        margin-bottom: 5px;
    }
    
    .donation-button-wrapper {
        flex-direction: column;
    }
}

@media (min-width: 701px) {
    .donation-button-wrapper {
        flex-direction: row;
        justify-content: center;
    }
}

#copyright-footer {
  text-align: center;
  font-size: 0.92em;
  color: #888;
  background: #f7f7f7;
  border-top: 1px solid #e0e0e0;
  padding: 12px 8px 16px 8px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.footer-links {
  margin-top: 6px;
  font-size: 0.92em;
}
.footer-link {
  color: #888;
  text-decoration: none;
  margin: 0 4px;
  transition: color 0.2s;
}
.footer-link:hover {
  color: #333;
  text-decoration: underline;
}

.footer-link-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 0.92em;
  margin: 0 4px;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link-btn:hover, .footer-link-btn:focus {
  color: #333;
  text-decoration: underline;
  outline: none;
}

/* center molecule */


#center-molecule {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 6px 10px;
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  font-size: 0.85rem;
  font-family: sans-serif;
  font-weight: bold;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

#center-molecule .material-symbols-outlined {
  font-size: 1.5rem;     /* scale icon slightly */
  margin-right: 6px;     /* space between icon and text */
  vertical-align: middle;

font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

#center-molecule:hover {
  opacity: 1;
  background-color: #f2f2f2;
}


/* google material symbols */


.material-symbols-outlined {
 
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}


.tree-icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  margin-right: 4px;
  display: inline-block;
}

.tree-label {
  font-size: 1em;
  vertical-align: top;
}

.tree-section-break {
  background-color: #ffffff; /* White background */
  color: #333;
  padding: 4px 0 0 0; /* 4px top, 0px right, 0px bottom, 0px left */
  margin: 0;
  width: 100%;
  text-align: center;
  font-weight: bold;
  position: relative;
  border-top: 2px solid #000000; /* Thicker black top border */
  /* Removed bottom border */
}

/* Style for the entire row containing section breaks */
.jstree-node:has(.tree-section-break) {
  background-color: #ffffff; /* White background */
  margin-top: 20px; /* Add spacing above section breaks */
  margin-bottom: 0;
}

/* Hide tree connector lines and adjust styles for section breaks */
.jstree-node:has(.tree-section-break) > i.jstree-icon {
  display: none;
}

/* Fix the width for the section break row and prevent content pushing */
.jstree-node:has(.tree-section-break) .jstree-anchor {
  width: 100%;
  height: auto; /* Prevent fixed height */
  line-height: normal; /* Use normal line height instead of fixed */
  padding: 0; /* Remove default padding */
  position: static; /* Prevent absolute positioning issues */
}

/* Remove hover effect on section breaks */
.jstree-node:has(.tree-section-break) .jstree-wholerow,
.jstree-node:has(.tree-section-break) .jstree-wholerow:hover {
  background-color: #ffffff; /* Maintain white background on hover */
}

/* Make section row non-selectable and improve layout */
.jstree-node:has(.tree-section-break) {
  pointer-events: none;
  display: block;
  height: auto; /* Allow natural height */
  min-height: 24px; /* Minimum height for visibility */
  overflow: visible; /* Ensure content isn't cut off */
}

/* tree buttons */

.vertical-line-tree-buttons {
    width: 2px;
    height: 30px; /* or whatever height you need */
    background-color: rgb(0, 0, 0);
    margin: 0 10px; /* spacing around the line */
}

/* Replaceable tree buttons styling */
#replaceable-tree-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

#replaceable-tree-buttons button {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color:#000000;
    transition: all 0.2s ease;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 50px;
    max-height: 50px;
     box-sizing: border-box;

}

    #replaceable-tree-buttons button * {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
    }
#replaceable-tree-buttons button:hover {
    background-color: #e8e8e8;
    transform: scale(1.05);
}

#replaceable-tree-buttons button:active {
    background-color: #d8d8d8;
    transform: scale(0.95);
}
