/* Non-critical styles - these are loaded after the critical inline styles */

/* Already inlined in HTML: 
:root vars, body, header, main, basic layout, process buttons, textarea */

/* Using system fonts instead of loading Poppins */
* {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Additional styling not in the critical CSS */
.area { 
  margin-bottom: 20px; 
}

.area label {
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
  color: var(--primary);
}

/* Inline Info Tooltip */
.info-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.info-tooltip {
  position: absolute;
  top: 50%;
  left: 110%;
  transform: translateY(-50%);
  background: #333;
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 5;
}

.info-tooltip.show { 
  opacity: 1; 
}

/* Input element styles */
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #bdc3c7;
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: #f9f9f9;
  transition: border-color 0.3s;
}

textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.counter {
  text-align: right;
  font-size: 0.8rem;
  color: #5f6a6b; /* Darkened for better contrast */
  margin-top: 5px;
  font-weight: 500; /* Added for better visibility */
}

/* Secret Key Toggle & Field */
.secret-key-toggle { 
  margin: 10px 0; 
}

.secret-key-field { 
  margin-bottom: 20px;
  display: none; 
  /* Ensure no movement when this appears by using height and opacity */
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.secret-key-field.visible {
  display: block;
  height: auto;
  opacity: 1;
}

/* Process buttons - addition to critical CSS */
.process-buttons button:hover { 
  transform: translateY(-2px); 
}

/* Output Area - additions to critical CSS */
.output-container {
  margin-bottom: 20px;
}

.button-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 80px; /* Prevent layout shift */
}

.button-panel button {
  padding: 10px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px; /* Fixed height to prevent layout shifts */
  width: 100%;
}

.button-panel button:hover { 
  transform: translateY(-2px); 
}

.btn-copy { 
  background: #2c3e50; /* Darkened for better contrast with white text */
  color: #ffffff;
  font-weight: 600;
}

.btn-clear { 
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

footer {
  text-align: center;
  font-size: 0.9rem;
  color: #5f6a6b; /* Darkened for better contrast */
  margin-top: 20px;
  font-weight: 500;
}

/* Dark mode */
body.dark-mode { 
  background: #1e272e; 
}

body.dark-mode header { 
  background: #40739e; 
}

body.dark-mode main {
  background: #2f3640;
  color: #f5f6fa;
  border-color: #444;
}

body.dark-mode textarea,
body.dark-mode input[type="text"] {
  background: #353b48;
  border-color: #718093;
  color: #f5f6fa;
}

body.dark-mode .counter { 
  color: #f5f6fa; /* Brightened for better contrast in dark mode */
  font-weight: 500;
}

body.dark-mode .btn-copy { 
  background: #2c3e50; 
}

body.dark-mode .area label {
  color: #dcdde1;
}

/* Notification style */
.notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--secondary);
  color: #ffffff;
  padding: 12px 25px;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: bottom 0.3s ease;
  z-index: 1000;
  width: auto;
  max-width: 90%;
  font-weight: 600; /* Better contrast weight */
  font-size: 1rem; /* Slightly larger for readability */
}

.notification.show {
  bottom: 20px;
}
