/**
 * Component Styles - Classic Breeding Registry Design
 * Zuchtbuch 2025 - Based on original registry styling
 */

/* ===== BUTTONS - Classic Registry Style ===== */
.button, .btn {
    display: inline-block;
    text-align: center;
    padding: 3px;
    border: 2px solid black;
    border-radius: 4px;
    background-color: #eeeeee;
    color: black;
    font-size: 16px;
    cursor: pointer;
    font-family: Verdana, Helvetica, Arial, sans-serif;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.button:hover, .btn:hover {
    background-color: #dddddd;
}

.button:focus, .btn:focus {
    outline: 1px dotted #333333;
    outline-offset: 1px;
}

/* Button Sizes - Based on old registry */
.button30 {
    width: 30%;
    text-align: center;
    padding: 3px;
    border: 2px solid black;
    border-radius: 4px;
    background-color: #eeeeee;
    color: black;
    font-size: 16px;
    cursor: pointer;
    display: inline-block;
}

.button100 {
    width: 100%;
    text-align: center;
    padding: 3px;
    border: 2px solid black;
    border-radius: 4px;
    background-color: #eeeeee;
    color: black;
    font-size: 16px;
    cursor: pointer;
    display: inline-block;
}

/* Special mate button from old registry */
.button_mate {
    padding: 3px;
    margin: 2px;
    border: 1px dotted #ff0000;
    text-align: center;
    font-weight: bold;
    font-size: 75%;
    color: #cc3333;
    background-color: #ffffff;
}

/* ===== FORMS - Classic Registry Style ===== */
form {
    text-align: left;
    padding: 5px;
    width: 100%;
}

input, select {
    text-align: left;
    font-weight: normal;
    font-size: 16px;
    width: 100%;
    border: 2px solid #000000;
    border-radius: 5px;
    padding: 1px;
    box-sizing: border-box;
    font-family: Verdana, Helvetica, Arial, sans-serif;
}

input:read-only, select:read-only {
    background-color: #eeeeee;
    color: #333333;
}

/* Width classes like old registry */
.sel10, .inp10 {
    width: 10%;
    max-width: 50px;
    text-align: center;
}

.sel30, .inp30 {
    width: 30%;
    max-width: 200px;
}

.sel50, .inp50 {
    width: 42%;
    max-width: 400px;
}

input[type=submit] {
    width: 50%;
    max-width: 400px;
    text-align: center;
}

/* Labels like old registry */
label {
    font-weight: normal;
    font-style: italic;
    font-size: 75%;
    border-top: 3px;
}

/* Input/Select in Labels - eigene Schriftgröße */
label input,
label select {
    font-size: 16px;
}

/* Fieldset und Legend Styling */
fieldset {
    padding: 5px;
    margin-bottom: 1rem;
}

legend {
    font-size: 1.1em;
    font-weight: bold;
    padding: 0 5px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: normal;
    font-style: italic;
    font-size: 75%;
    margin-bottom: 0.25rem;
}

.form-label.required::after {
    content: " *";
    color: #cc3333;
}

/* ===== CARDS & CONTAINERS - Classic Registry Style ===== */
.userinfo {
    border: 1px dotted #333333;
    border-radius: 5px;
    text-align: center;
    color: #333333;
    font-size: 10px;
    background-color: #ffffff;
    padding: 3px;
    margin: 5px 0;
}

.interactive {
    border: 1px dashed #eeeeee;
    min-height: 100px;
}

.header {
    border: 0px solid #cccccc;
    min-height: 105px;
    text-align: center;
}

.copyright {
    border: 0px dotted #cccccc;
    text-align: center;
}

/* Layout helpers */
.drittel {
    width: 33%;
    float: left;
    box-sizing: border-box;
    padding-right: 5px;
    border: none;
}

/* ===== ALERTS - Classic Registry Style ===== */
.message-box, .alert {
    padding: 5px;
    border: 1px dotted #ff0000;
    text-align: center;
    font-weight: bold;
    font-size: 125%;
    color: #000000;
    background-color: #ffcccc;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #059669;
    color: #064e3b;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #d97706;
    color: #92400e;
}

.alert-error {
    background-color: #ffcccc;
    border-color: #ff0000;
    color: #000000;
}

.alert-info {
    background-color: #e0f2fe;
    border-color: #0284c7;
    color: #0c4a6e;
}

/* ===== NAVIGATION - Classic Registry Style mit Dropdown ===== */
.menue {
    padding: 5px;
    border: 0px;
    border-style: none;
    text-align: center;
    font-weight: normal;
    font-size: 100%;
}

.nav {
    text-align: center;
    margin: 0;
    padding: 5px;
    position: relative;
}

.nav-link {
    display: inline-block;
    margin: 0 2px;
    text-decoration: none;
    color: #000000;
}

.nav-link:hover {
    color: #000000;
    text-decoration: none;
}

.nav-link.active {
    font-weight: bold;
}

/* ===== DROPDOWN MENU - Pure CSS ===== */
.dropdown {
    position: relative;
    display: inline-block;
    margin: 0 2px;
}

.dropdown-toggle {
    display: inline-block;
    padding: 3px;
    border: 2px solid black;
    border-radius: 4px;
    background-color: #eeeeee;
    color: black;
    font-size: 16px;
    cursor: pointer;
    font-family: Verdana, Helvetica, Arial, sans-serif;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-toggle:hover {
    background-color: #dddddd;
}

/* Pfeil für Dropdown */
.dropdown-toggle::after {
    content: " ▼";
    font-size: 12px;
    margin-left: 5px;
}

/* Dropdown Content - standardmäßig versteckt */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background-color: #ffffff;
    border: 2px solid black;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    margin-top: 2px;
}

/* Dropdown sichtbar machen bei Hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Dropdown Links */
.dropdown-content a {
    display: block;
    padding: 8px 12px;
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #eeeeee;
    transition: background-color 0.2s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #eeeeee;
    color: #000000;
}

/* Alternative: Checkbox-basiertes Dropdown (klickbar) */
.dropdown-checkbox {
    position: relative;
    display: inline-block;
    margin: 0 2px;
}

.dropdown-checkbox input[type="checkbox"] {
    display: none;
}

.dropdown-checkbox label {
    display: inline-block;
    padding: 3px;
    border: 2px solid black;
    border-radius: 4px;
    background-color: #eeeeee;
    color: black;
    font-size: 16px;
    cursor: pointer;
    font-family: Verdana, Helvetica, Arial, sans-serif;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-checkbox label:hover {
    background-color: #dddddd;
}

.dropdown-checkbox label::after {
    content: " ▼";
    font-size: 12px;
    margin-left: 5px;
}

.dropdown-checkbox input:checked + label::after {
    content: " ▲";
}

.dropdown-checkbox .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background-color: #ffffff;
    border: 2px solid black;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    margin-top: 2px;
}

.dropdown-checkbox input:checked ~ .dropdown-menu {
    display: block;
}

.dropdown-checkbox .dropdown-menu a {
    display: block;
    padding: 8px 12px;
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #eeeeee;
    transition: background-color 0.2s ease;
}

.dropdown-checkbox .dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-checkbox .dropdown-menu a:hover {
    background-color: #eeeeee;
    color: #000000;
}

/* ===== TABLES - Classic Registry Style ===== */
table {
    width: 100%;
    border: 0;
    cellpadding: 1;
    cellspacing: 0;
    border-collapse: collapse;
}

/* Alternating row colors like old registry */
.tabellen-line-1 {
    text-align: left;
    font-weight: normal;
    font-size: 75%;
    background-color: #eeeeee;
}

.tabellen-line-2 {
    text-align: left;
    font-weight: normal;
    font-size: 75%;
    background-color: #ffffff;
}

/* Font sizes */
.fontL {
    font-size: 120%;
}

.small_text {
    font-size: x-small;
}

td, th {
    padding: 3px;
    vertical-align: top;
}

th {
    font-weight: bold;
    text-align: left;
}

/* ===== SPECIAL ELEMENTS - Classic Registry Style ===== */
.litter_puppy {
    border: 2px solid #000000;
    border-radius: 5px;
    padding: 3px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
}

.puppy_number {
    border: 0;
    border-radius: 5px;
    padding: 3px;
    box-sizing: border-box;
    flex: 1;
    font-size: 200%;
    font-weight: bold;
}

.puppy_value {
    border: 0;
    border-radius: 5px;
    padding: 3px;
    box-sizing: border-box;
    flex: 200;
}

/* Special IDs for puppy management */
#puppy1, #puppy2, #puppy3, #puppy4, #puppy5, #puppy6, #puppy7, #puppy8, #puppy9, #puppy10,
#puppy11, #puppy12, #puppy13, #puppy14, #puppy15, #puppy16, #puppy17, #puppy18, #puppy19, #puppy20 {
    display: block;
}

#puppy1hidden, #puppy2hidden, #puppy3hidden, #puppy4hidden, #puppy5hidden, #puppy6hidden, #puppy7hidden, #puppy8hidden, #puppy9hidden, #puppy10hidden,
#puppy11hidden, #puppy12hidden, #puppy13hidden, #puppy14hidden, #puppy15hidden, #puppy16hidden, #puppy17hidden, #puppy18hidden, #puppy19hidden, #puppy20hidden {
    display: none;
}

/* Specific field styling */
#user_postalcode {
    width: 90px;
}

/* ===== RESPONSIVE COMPONENTS ===== */
@media (max-width: 768px) {
    .button, .btn {
        padding: 5px;
        font-size: 14px;
    }
    
    .button30 {
        width: 45%;
    }
    
    .button100 {
        width: 100%;
    }
    
    .drittel {
        width: 100%;
        float: none;
        padding-right: 0;
    }
    
    input, select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .tabellen-line-1, .tabellen-line-2 {
        font-size: 70%;
    }
}

/* ===== INFO PAGES STYLES ===== */
.info-page {
    line-height: 1.6;
    color: #333333;
}

.info-page ul,
.info-page ol {
    margin-left: 0;
    padding-left: 2em; /* Genug Platz für Listenpunkte */
    list-style-position: outside; /* Punkte außerhalb des Textblocks */
    margin-bottom: 1em;
}

.info-page li {
    margin-bottom: 0.5em; /* Abstand zwischen Listenpunkten */
}

.info-page h1 {
    font-size: 1.8em;
    margin-bottom: 0.8em;
    border-bottom: 2px solid #cccccc;
    padding-bottom: 0.3em;
}

.info-page h2 {
    font-size: 1.5em;
    margin-bottom: 0.6em;
    margin-top: 1.2em;
}

.info-page h3 {
    font-size: 1.3em;
    margin-bottom: 0.5em;
    margin-top: 1em;
}

.info-page p {
    margin-bottom: 1em;
}

/* ===== FORM COMPONENTS ===== */
.textarea-fullwidth {
    width: 100%;
    resize: vertical;
    min-height: 300px;
}

.admin-image-preview {
    max-width: 200px;
    max-height: 150px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    margin: 10px 0;
}

.current-image-preview {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

/* ===== INFO PAGE BILDER ===== */
.info-page-image {
    float: right;
    width: 30%;
    margin: 0 0 5px 5px; /* 5px Abstand links und unten */
    border-radius: 4px;
    height: auto;
}