/* =============================================================================
   SecNote - Stylesheet (style.css)

   Layout und Styling für die SecNote-Anwendung.
   Optimiert für mobile Nutzung (Smartphone-first).

   Struktur:
   1. Basis-Styles (Body, Links)
   2. Haupt-Container (#haupt)
   3. Eingabe-Seite (#schreiben)
   4. Ergebnis-Anzeige (#gespeichert, #url, #urlbox)
   5. Nachricht-Anzeige (#anzeigen1, #anzeigen2)
   6. Viewer (#viewer-container, #viewer-*)
   7. Statistik (#statistik)
   8. Passwort-Hinweise
   9. Footer (#version)
   10. Formular-Elemente
   ============================================================================= */

/* --- 1. Basis-Styles --- */

body {
  background: #999999;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 10px;
  -webkit-text-size-adjust: 100%;
}

a {
  color: #000000;
  text-align: center;
  word-wrap: break-word;
}

a.mein-btn {
  display: inline-block;
  font-size: 15px;
  padding: 10px 20px;
  line-height: 24px;
  background-color: #009900;
  color: #ffffff !important;
  border-radius: 6px;
  text-decoration: none !important;
}


a.btn-primary {
  display: inline-block;
  font-size: 15px;
  padding: 10px 20px;
  min-height: 44px;
  line-height: 24px; /* damit min-height visuell stimmt */
  background: #009900;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

td#haupt, td.content {
  border: 2px solid #44a320;
}

/* --- 2. Haupt-Container --- */

#haupt {
  display: grid;
  justify-items: stretch;
  align-items: center;
  border-radius: 10px;
  border: 2px solid #009900;
  max-width: 380px;
  width: calc(100% - 20px);
  margin: 0 auto;
  padding: 5px;
  box-sizing: border-box;
}

/* --- 9. Footer / Versionsanzeige --- */

h3 {
  text-align: center;
  font-size: 18px;
  margin: 8px 0 4px 0;
}

h4 {
  font-size: 15px;
  margin: 8px 0;
}

a#version {
  font-size: 14px;
  color: #009900;
  text-align: center;
  display: inline;
}

span#version {
  display: block;
  color: #009900;
  padding: 10px 0 6px 0;
  line-height: 1.8;
}

footer {
  text-align: center;
}

/* --- 4. Ergebnis-Anzeige --- */

button {
  background: #bbbbbb;
  border: 1px solid #888;
  border-radius: 4px;
  padding: 8px 16px;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
}

.btn-green {
  font-size: 15px;
  padding: 10px 20px;
  min-height: 44px;
  background: #009900;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  -webkit-appearance: none;
}

.btn-green:active {
  background: #007700;
}

#url {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 0;
}

#urlbox {
  margin: 0 auto;
  width: 90%;
  text-align: center;
  background: #aaaaaa;
  border-radius: 6px;
  padding: 10px 5px;
}

#hinweis {
  color: #009900;
}

/* --- Link zum Neue-Nachricht-Schreiben (grosser Abstand zum Copy-Button) --- */
.btn-neue-nachricht {
  display: inline-block;
  font-size: 15px;
  padding: 10px 20px;
  min-height: 44px;
  line-height: 24px; /* damit min-height visuell stimmt */
  background: #009900;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;

}

/* --- 5. Nachricht-Anzeige --- */

#anzeigen1 {
  background: #bbbbbb;
  text-align: center;
  width: 100%;
  word-wrap: break-word;
  word-break: break-word;
  padding: 10px 0;
  box-sizing: border-box;
}

#anzeigen2 {
  background: #bbbbbb;
  text-align: center;
  width: 100%;
  word-wrap: break-word;
  word-break: break-word;
  padding: 10px 0;
  box-sizing: border-box;
}

#gespeichert {
  background: #bbbbbb;
  text-align: center;
  width: 100%;
  word-wrap: break-word;
  word-break: break-word;
  padding: 12px 8px;
  box-sizing: border-box;
}

/* --- 3. Eingabe-Seite --- */

#schreiben {
  background: #bbbbbb;
  text-align: center;
  width: 100%;
  padding: 10px 8px;
  box-sizing: border-box;
  border-radius: 6px;
}

#text1 {
  display: block;
  padding: 0 5px;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

/* --- 10. Formular-Elemente --- */

textarea {
  width: 95%;
  max-width: 340px;
  font-size: 14px;
  padding: 8px;
  border: 1px solid #888;
  border-radius: 4px;
  box-sizing: border-box;
  resize: vertical;
}

input[type="text"],
input[type="password"] {
  font-size: 14px;
  padding: 6px 8px;
  border: 1px solid #888;
  border-radius: 4px;
}

input[type="submit"] {
  font-size: 15px;
  padding: 10px 20px;
  min-height: 44px;
  background: #009900;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  -webkit-appearance: none;
}

input[type="submit"]:active {
  background: #007700;
}

input[type="submit"]:disabled {
  background: #888888;
  cursor: not-allowed;
}

input[type="file"] {
  font-size: 13px;
}

select {
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
}

/* --- 8. Passwort-Hinweise --- */

#passworthinweisSender {
  color: #ff0000;
  font-size: 11px;
}

#empfaengerhinweis {
  color: #000000;
  font-size: 13px;
}

#passworthinweis {
  font-size: 13px;
}

label {
  font-size: 13px;
}

/* --- 7. Statistik --- */

#statistik {
  background: #bbbbbb;
  text-align: center;
  width: 100%;
  word-wrap: break-word;
  padding: 10px 0;
  box-sizing: border-box;
  border-radius: 6px;
}

/* --- 6. Viewer (Nachricht lesen) --- */

#viewer-container {
  background: #bbbbbb;
  text-align: center;
  width: 100%;
  word-wrap: break-word;
  word-break: break-word;
  padding: 10px 8px;
  box-sizing: border-box;
  border-radius: 6px;
}

#viewer-loading {
  padding: 20px 0;
  color: #333;
  font-size: 14px;
}

#viewer-error {
  padding: 20px 10px;
  color: #cc0000;
  font-size: 14px;
}

#viewer-content {
  padding: 10px 5px;
  text-align: center;
  line-height: 1.5;
}

#viewer-content h2 {
  text-align: center;
  font-size: 17px;
}

#viewer-password {
  padding: 10px 5px;
}

/* Verarbeitungs-Zustand: Formular wird ausgegraut und Klicks deaktiviert */
.secnote-processing {
  opacity: 0.6;
  pointer-events: none;
}
