256 lines
6.3 KiB
CSS
256 lines
6.3 KiB
CSS
/**
|
||
* @file productAdder.css
|
||
* @brief Stylesheet für die Produkt-Hinzufügen-Seite (Product Adder).
|
||
* @details Enthält spezielle Stile für Dropdowns (Select-Elemente) und Formulare,
|
||
* die für die Dateneingabe beim Hinzufügen von Produkten benötigt werden.
|
||
* Das grundlegende Layout basiert auf den gleichen Prinzipien wie die Auth-Bereiche,
|
||
* wurde jedoch für breitere Formulare (bis zu 1100px) angepasst.
|
||
*/
|
||
|
||
/* ==========================================================
|
||
PRODUCT ADDER – Dropdown & Form Styles
|
||
========================================================== */
|
||
|
||
/**
|
||
* @section SelectDropdown Dropdown-Auswahl
|
||
* @brief Stile für den Container und die Elemente eines Dropdown-Menüs.
|
||
*/
|
||
/* ─── Select Wrapper ─── */
|
||
/**
|
||
* @brief Umhüllender Container für das Select-Element.
|
||
* @details Zentriert das Element, beschränkt die Maximalbreite auf 520px und
|
||
* verwendet ein CSS-Grid für saubere Abstände (gap) zwischen Label und Feld.
|
||
*/
|
||
.auth__select__wrap {
|
||
width: min(520px, 100%);
|
||
display: grid;
|
||
gap: 6px;
|
||
justify-self: center;
|
||
margin-top: 12px;
|
||
}
|
||
|
||
/**
|
||
* @brief Label-Text für die Dropdown-Auswahl.
|
||
*/
|
||
.auth__select__label {
|
||
font-size: 0.95rem;
|
||
color: #ffffff;
|
||
}
|
||
|
||
/**
|
||
* @brief Hauptstil für das Dropdown-/Select-Feld.
|
||
* @details Beinhaltet Customizing des nativen Aussehens (appearance: none) und
|
||
* fügt ein eigenes Pfeil-Icon via Hintergrund-Gradient (background-image) hinzu.
|
||
* Das Feld besitzt Übergangseffekte für den Hover- und Focus-State.
|
||
*/
|
||
.auth__select {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 12px 40px 12px 12px;
|
||
border: 1px solid #5e6075;
|
||
border-radius: 5px;
|
||
background-color: #1e2537;
|
||
color: #ffffff;
|
||
outline: none;
|
||
appearance: none;
|
||
transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
|
||
background-image:
|
||
linear-gradient(45deg, transparent 50%, #cbd5f5 50%),
|
||
linear-gradient(135deg, #cbd5f5 50%, transparent 50%),
|
||
linear-gradient(to right, #1e2537, #1e2537);
|
||
background-position:
|
||
calc(100% - 18px) calc(1em + 2px),
|
||
calc(100% - 13px) calc(1em + 2px),
|
||
100% 0;
|
||
background-size: 5px 5px, 5px 5px, 2.5em 100%;
|
||
background-repeat: no-repeat;
|
||
}
|
||
|
||
/**
|
||
* @brief Fokus-Status für das Dropdown-Feld.
|
||
* @details Erhält den gleichen leuchtenden Rand (Glow) wie die Standard-Eingabefelder.
|
||
*/
|
||
.auth__select:focus {
|
||
border-color: rgba(37, 99, 235, 0.75);
|
||
box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.28);
|
||
}
|
||
|
||
/**
|
||
* @brief Stil der Auswahloptionen (options) innerhalb des Selects.
|
||
*/
|
||
.auth__select option {
|
||
background: #1e2537;
|
||
color: #ffffff;
|
||
}
|
||
|
||
/**
|
||
* @section ProductAdderLayout Seiten-Layout
|
||
* @brief Definition der Haupt-Grid-Strukturen auf der Product-Adder-Seite.
|
||
*/
|
||
/* ─── Product Adder Layout ─── */
|
||
/**
|
||
* @brief Äußerer Container für das Formular, der die volle Viewport-Höhe einnimmt.
|
||
*/
|
||
.auth {
|
||
min-height: 100vh;
|
||
display: grid;
|
||
place-items: start center;
|
||
padding: 32px 16px;
|
||
gap: 16px;
|
||
}
|
||
|
||
/**
|
||
* @brief Das Raster für die Formular-Zellen/Karten.
|
||
* @details Erlaubt eine maximale Breite von 1100px. Bietet genügend Platz für
|
||
* umfangreiche Produkt-Eigenschaften und Beschreibungen.
|
||
*/
|
||
.auth__grid {
|
||
width: min(1100px, 100%);
|
||
display: grid;
|
||
grid-template-columns: 1fr;
|
||
gap: 20px;
|
||
}
|
||
|
||
/**
|
||
* @brief Die Kachel/Karte für einzelne Bereiche des Formulars.
|
||
* @details Hebt Formularabschnitte visuell mit Hintergrundfarbe, Rand und Schatteneffekt ab.
|
||
*/
|
||
.auth__card {
|
||
background: #1f2937;
|
||
border: 1px solid #5e6075;
|
||
border-radius: 5px;
|
||
padding: 18px;
|
||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
|
||
}
|
||
|
||
/**
|
||
* @brief Kopfbereich innerhalb einer Kachel (auth__card).
|
||
*/
|
||
.auth__header {
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
/**
|
||
* @brief Titeltext der Kachel.
|
||
*/
|
||
.auth__title {
|
||
margin: 0;
|
||
font-size: 1.1rem;
|
||
color: #ffffff;
|
||
}
|
||
|
||
/**
|
||
* @section FormularElemente Formulare und Eingabefelder
|
||
* @brief Spezifische Layout-Vorgaben für die Formular-Bestandteile.
|
||
*/
|
||
/**
|
||
* @brief Ein einzelner Formular-Eintrag (Label + Input).
|
||
*/
|
||
.auth__form {
|
||
display: grid;
|
||
gap: 8px;
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
/**
|
||
* @brief Labels, die sich im Product-Adder-Formular befinden.
|
||
*/
|
||
.auth__form label {
|
||
font-size: 0.95rem;
|
||
color: #ffffff;
|
||
}
|
||
|
||
/**
|
||
* @brief Standard-Text-Eingabefeld.
|
||
* @details Verfügt über anpassbare Abstände, Randfarben und einen sanften Übergang bei Interaktionen.
|
||
*/
|
||
.auth__input {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 10px 12px;
|
||
border: 1px solid #5e6075;
|
||
border-radius: 5px;
|
||
background: #1e2537;
|
||
color: #ffffff;
|
||
outline: none;
|
||
transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
|
||
}
|
||
|
||
/**
|
||
* @brief Zustand bei aktivem Feld (Fokus).
|
||
*/
|
||
.auth__input:focus {
|
||
border-color: rgba(37, 99, 235, 0.75);
|
||
box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.28);
|
||
}
|
||
|
||
/**
|
||
* @brief Aussehen des Platzhalter-Textes.
|
||
*/
|
||
.auth__input::placeholder {
|
||
color: #cbd5e1;
|
||
}
|
||
|
||
/**
|
||
* @brief Mehrzeilige Textarea für die Beschreibung.
|
||
* @details Mindesthöhe definiert, nur vertikal anpassbar, verbesserte Zeilenhöhe für besseren Lesefluss.
|
||
*/
|
||
textarea.auth__input {
|
||
min-height: 80px;
|
||
resize: vertical;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
/**
|
||
* @brief Verhindert unnötigen Abstand beim letzten Formular-Element innerhalb der Karte.
|
||
*/
|
||
.auth__card .auth__form:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
/**
|
||
* @section Responsive Responsive Design
|
||
* @brief Anpassungen für Tabets und mobile Geräte.
|
||
*/
|
||
/* ─── Responsive ─── */
|
||
/**
|
||
* @brief Ansichten bis zu 720px Breite (Tablets/kleine Bildschirme).
|
||
* @details Reduziert die Paddings, um mehr Platz für den Inhalt zu schaffen.
|
||
*/
|
||
@media (max-width: 720px) {
|
||
.auth {
|
||
padding: 24px 12px;
|
||
}
|
||
|
||
.auth__card {
|
||
padding: 16px;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @brief Ansichten bis zu 480px Breite (Smartphones).
|
||
* @details Stark reduzierte Abstände (Padding, Gaps) und angepasste Schriftgrößen
|
||
* zur Sicherstellung der Lesbarkeit auf mobilen Displays.
|
||
*/
|
||
@media (max-width: 480px) {
|
||
.auth {
|
||
padding: 1rem 0.5rem;
|
||
}
|
||
|
||
.auth__card {
|
||
padding: 1rem;
|
||
}
|
||
|
||
.auth__grid {
|
||
gap: 1rem;
|
||
}
|
||
|
||
.auth__title {
|
||
font-size: 1.05rem;
|
||
}
|
||
|
||
.auth__select__wrap {
|
||
margin-top: 0.5rem;
|
||
}
|
||
}
|