/* ===========================
   Dogyworld – Base Stylesheet
   Gültig für alle Seiten
   =========================== */

/* CSS-Variablen */
:root {
    --primary: #D400FF;
    /* --dark: #1a1a1a;*/
    --dark: #000000;
    --light: #f4f4f4;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
}

/* Comfortaa-Font global erzwingen */
body, h1, h2, h3, h4, h5, h6, p, a, span, div,
input, button, select, textarea,
.rendered-form *:not(i), .modal-content *:not(i) {
    font-family: 'Comfortaa', sans-serif !important;
}

/* ---- Layout ---- */
body { margin: 0; display: flex; background: var(--light); }
.sidebar {
    width: 250px; background: var(--dark); height: 100vh;
    color: white; position: fixed; top: 0; left: 0;
    overflow-y: auto; z-index: 100;
    display: flex; flex-direction: column;
}
.main {
    margin-left: 250px; padding: 40px;
    width: calc(100% - 250px); box-sizing: border-box;
}

/* ---- Card ---- */
.card {
    background: white; padding: 30px;
    border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

/* ---- Tabelle ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 15px; border-bottom: 1px solid #eee; }
th { background: #f9f9f9; color: #555; text-transform: uppercase; font-size: 0.85em; }

/* ---- Badges ---- */
.badge {
    display: inline-block; width: 155px; text-align: center; white-space: nowrap;
    padding: 5px 10px; border-radius: 20px; box-sizing: border-box;
    font-size: 0.8em; font-weight: bold; color: white;
}
.badge-paid,   .b-firm    { background: var(--success); }
.badge-cancelled, .b-cancel { background: var(--danger); }
.b-pending     { background: var(--warning); }

/* ---- Card Badge (Eck-Ribbon) ---- */
.card-badge-wrap {
    position: absolute;
    top: 0; right: 0;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
    width: 110px;
    height: 110px;
}
.card-badge {
    position: absolute;
    top: 18px;
    right: -28px;
    background: #e74c3c;
    color: white;
    font-size: 0.82em;
    font-weight: 900;
    padding: 5px 50px;
    transform: rotate(45deg);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

/* ---- Buttons ---- */
.btn {
    background: var(--primary); color: white; border: none;
    padding: 10px 20px; border-radius: 6px; cursor: pointer;
    text-decoration: none; display: inline-block; font-weight: bold;
    transition: 0.2s;
}
.btn:hover { opacity: 0.9; }

.btn-cancel {
    background: white; color: var(--danger); border: 1px solid var(--danger);
    padding: 5px 0; border-radius: 20px; cursor: pointer;
    text-decoration: none; font-size: 0.8em; font-weight: bold; transition: 0.2s;
    display: inline-block; width: 157px; text-align: center; white-space: nowrap;
    box-sizing: border-box;
}
.btn-cancel:hover { background: var(--danger); color: white; }

.btn-small {
    padding: 8px 12px; border: none; border-radius: 5px;
    cursor: pointer; color: white; text-decoration: none;
    font-size: 0.85em; margin-left: 5px;
}

/* ---- Meldungen ---- */
.msg {
    padding: 12px; border-radius: 8px; margin-bottom: 20px;
    font-size: 0.85em; text-align: left; line-height: 1.4;
}
.msg-box {
    padding: 15px; border-radius: 8px;
    margin-bottom: 20px; font-weight: bold;
}
.msg-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.msg-warning  { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.msg-error    { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ---- Modal ---- */
.modal {
    display: none; position: fixed; z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.modal-content {
    background-color: #fefefe; margin: 10vh auto; padding: 40px;
    border-radius: 15px; width: 90%; max-width: 600px;
    position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease-out;
    max-height: 80vh; overflow-y: auto;
}
@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
.close-btn {
    position: absolute; top: 20px; right: 25px;
    color: #aaa; font-size: 28px; font-weight: bold;
    cursor: pointer; transition: 0.2s;
}
.close-btn:hover { color: var(--danger); }
.modal-content h2 {
    color: var(--primary); margin-top: 0;
    border-bottom: 2px solid #eee; padding-bottom: 15px;
}

/* ---- Formulare ---- */
.form-group { margin-bottom: 15px; }
label { display: block; font-weight: bold; margin-bottom: 5px; color: #444; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="url"],
select, textarea {
    width: 100%; padding: 10px; border: 1px solid #ccc;
    border-radius: 6px; box-sizing: border-box; font-size: 1em;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary); outline: none;
}

/* ---- Grids ---- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; margin-bottom: 25px;
}

.hidden { display: none !important; }

/* --- Emoji-Picker --- */
.dw-emoji-picker {
    display:none; width:320px; background:white; border-radius:12px;
    box-shadow:0 8px 30px rgba(0,0,0,0.2); overflow:hidden; font-family:sans-serif;
}
.dw-emoji-header {
    display:flex; align-items:center; gap:6px; padding:8px 10px; border-bottom:1px solid #eee; background:#fafafa;
}
.dw-emoji-search {
    flex:1; border:1px solid #ddd; border-radius:6px; padding:6px 10px; font-size:0.85em; outline:none;
}
.dw-emoji-search:focus { border-color:var(--primary); }
.dw-emoji-close {
    background:none; border:none; font-size:1.3em; cursor:pointer; color:#aaa; padding:0 4px; line-height:1;
}
.dw-emoji-close:hover { color:#e74c3c; }
.dw-emoji-tabs {
    display:flex; gap:2px; padding:6px 8px; border-bottom:1px solid #eee; overflow-x:auto; background:#fafafa;
}
.dw-emoji-tab {
    background:none; border:none; font-size:1.15em; cursor:pointer; padding:4px 6px; border-radius:6px;
    opacity:0.5; transition:0.15s;
}
.dw-emoji-tab:hover { opacity:0.8; background:#f0f0f0; }
.dw-emoji-tab.active { opacity:1; background:#fce0ff; }
.dw-emoji-grid {
    padding:8px; max-height:220px; overflow-y:auto; display:flex; flex-wrap:wrap; gap:2px; align-content:flex-start;
}
.dw-emoji-cat-title {
    width:100%; font-size:0.75em; font-weight:bold; color:#aaa; text-transform:uppercase;
    letter-spacing:0.5px; padding:4px 2px 2px; margin-top:2px;
}
.dw-emoji-btn {
    width:36px; height:36px; display:flex; align-items:center; justify-content:center;
    font-size:1.3em; background:none; border:none; border-radius:6px; cursor:pointer; transition:0.1s;
}
.dw-emoji-btn:hover { background:#f0f0f0; transform:scale(1.2); }
.emoji-trigger {
    background:none; border:1px solid #ddd; border-radius:6px; cursor:pointer; font-size:1.1em;
    padding:4px 8px; transition:0.15s; line-height:1;
}
.emoji-trigger:hover { border-color:var(--primary); background:#fce0ff; }
