/**
 * @file
 * Styles for the Glass Nomenclature Tool page.
 */

/* Container */
.glass-nomenclature-tool {
  max-width: 100%;
  margin: 0 auto;
  font-family: 'Lato', Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Intro Text */
.tool-intro {
  text-align: center;
  padding: 1rem 1rem 1.5rem;
  color: #324958;
}

.tool-intro p {
  margin: 0;
  font-size: 1.1rem;
}

/* Tab Navigation */
.tool-tabs {
  display: flex;
  justify-content: center;
  border-bottom: 2px solid #EEEEEF;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  background-color: #F5F5F5;
}

.tool-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 1rem 2rem;
  font-family: 'Lato', Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #777777;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-tab-btn:hover {
  background-color: #E6EFF6;
  color: #0073B9;
}

.tool-tab-btn:focus {
  outline: 2px solid #0073B9;
  outline-offset: 2px;
}

.tool-tab-btn.active {
  color: #0073B9;
  border-bottom-color: #0073B9;
  background-color: #ffffff;
  font-weight: 700;
}

/* Content Area */
.tool-content {
  position: relative;
  width: 100%;
  background: #ffffff;
}

.tool-panel {
  display: none;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-panel.active {
  display: block;
  opacity: 1;
}

/* Iframe Container */
.iframe-container {
  position: relative;
  width: 100%;
  min-height: 800px;
  height: 1400px; /* Large default height to fit content */
  background-color: #ffffff;
  border: 1px solid #EEEEEF;
  border-top: none;
  overflow: hidden;
  transition: height 0.3s ease;
}

.tool-iframe {
  position: absolute;
  top: -110px;
  left: 0;
  width: 100%;
  height: calc(100% + 110px);
  border: none;
  background-color: #ffffff;
}

/* Loading State */
.iframe-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 5;
}

.iframe-loading p {
  margin-top: 1rem;
  color: #777777;
  font-size: 1rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #E5E5E5;
  border-top: 4px solid #0073B9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (min-width: 768px) {
  .iframe-container {
    height: 1300px;
  }
}

@media (min-width: 992px) {
  .iframe-container {
    height: 1200px;
  }
}

@media (min-width: 1200px) {
  .iframe-container {
    min-height: 1000px;
    height: 1100px;
  }
}

@media (max-width: 767px) {
  .tool-tabs {
    flex-direction: row;
  }
  
  .tool-tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  .tool-intro p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
}

/* Print Styles */
@media print {
  .tool-tabs {
    display: none;
  }
  
  .tool-panel {
    display: block !important;
    page-break-before: always;
  }
}

