/* LASER-ADT Professional Designer Styles v7.1 - Premium Workspace */

:root { 
    --primary: #2563eb; 
    --primary-hover: #1d4ed8;
    --success: #10b981; 
    --etsy: #eb6d20; 
    --danger: #ef4444; 
    --dark: #0f172a; 
    --panel-bg: rgba(30, 41, 59, 0.85);
    --toolbar-bg: rgba(15, 23, 42, 0.75);
    --border-light: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --canvas-bg: #1e293b;
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #0f172a;
    background: linear-gradient(135deg, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.85) 100%), url('../img/hintergrund.jpg');
    background-size: cover;
    background-attachment: fixed;
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    color: var(--text-main);
    user-select: none;
    min-height: 100vh;
}

/* --- Header --- */
.header-box { 
    text-align: center; 
    margin: 20px 0 10px; 
    position: relative;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.back-home-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    transition: 0.2s;
    border: 1px solid transparent;
}
.back-home-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    border-color: var(--border-light);
}

#p-name {
    margin: 0;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.badge-outdoor {
    display: inline-flex;
    align-items: center;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid var(--primary);
    color: #60a5fa;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.badge-outdoor span { margin-left: 6px; }

/* --- Toolbar (Floating Glassmorphism) --- */
.toolbar { 
    background: var(--toolbar-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px; 
    width: 95%; 
    max-width: 900px;
    border-radius: 16px;
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.4); 
    border: 1px solid var(--border-light);
    position: sticky; 
    top: 10px; 
    z-index: 100; 
    flex-wrap: wrap; 
}

.tool-group {
    display: flex;
    gap: 6px;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.03);
}

.btn { 
    padding: 10px 14px; 
    border: 1px solid transparent; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 600; 
    background: rgba(255,255,255,0.08); 
    color: var(--text-main);
    display: flex; 
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn:hover { 
    background: rgba(255,255,255,0.15); 
    transform: translateY(-1px);
}

.btn-icon { padding: 10px; }

.btn-add { background: var(--primary); color: white; border-color: rgba(255,255,255,0.1); }
.btn-add:hover { background: var(--primary-hover); }

.delete-btn { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.delete-btn:hover { background: var(--danger); color: white; }

.btn-crop-confirm { background: var(--success); color: white; }

.font-select { 
    padding: 9px; 
    border-radius: 8px; 
    border: 1px solid rgba(255,255,255,0.1); 
    background: #1e293b;
    color: white;
    font-weight: bold; 
    max-width: 140px; 
    outline: none;
}

.color-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.05);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}
.color-wrapper span { font-size: 0.75rem; font-weight: bold; color: var(--text-muted); }

.color-picker {
    border: none;
    width: 26px;
    height: 26px;
    cursor: pointer;
    background: none;
    border-radius: 50%;
    padding: 0;
}
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; }

/* Seiten Wechsler */
.side-switcher { display: flex; gap: 4px; }
.tab-btn {
    background: rgba(255,255,255,0.05);
    border: none; color: var(--text-muted);
    padding: 8px 15px; border-radius: 8px;
    cursor: pointer; font-weight: bold; transition: 0.2s;
}
.tab-btn.active { background: var(--primary); color: white; }

/* --- Canvas Bereich (Blueprint Style) --- */
.canvas-container-outer { 
    margin: 20px auto; 
    position: relative; 
    padding: 40px; 
    background-color: var(--canvas-bg); 
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 16px; 
    display: flex; 
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
}

.ruler { 
    position: absolute; 
    font-size: 10px; 
    color: #64748b; 
    font-weight: bold; 
    z-index: 50; 
    pointer-events: none; 
}

.ruler-h { 
    top: 15px; left: 40px; right: 40px; height: 15px; 
    border-bottom: 1px solid #475569; 
    display: flex; justify-content: space-between; 
}

.ruler-v { 
    left: 15px; top: 40px; bottom: 40px; width: 15px; 
    border-right: 1px solid #475569; 
    display: flex; flex-direction: column; justify-content: space-between; 
}

#dim-label { 
    position: absolute; 
    background: var(--primary); 
    color: white; 
    padding: 4px 8px; 
    border-radius: 6px; 
    font-size: 11px; 
    font-weight: bold;
    display: none; 
    z-index: 1000; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* --- Save Button --- */
.btn-save { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%); 
    color: white; 
    width: 90%; 
    max-width: 450px; 
    height: 60px; 
    margin: 20px 0 50px; 
    font-size: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
    letter-spacing: 0.5px;
}
.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(16, 185, 129, 0.4);
}

/* --- Premium Modal --- */
.overlay { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.8); z-index: 999; backdrop-filter: blur(8px);
}

.premium-modal {
    background: #1e293b;
    padding: 30px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    max-width: 420px;
    width: 90%;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
}

.close-modal-btn {
    position: absolute; right: 20px; top: 15px; 
    font-size: 28px; cursor: pointer; color: var(--text-muted);
    transition: 0.2s;
}
.close-modal-btn:hover { color: white; transform: scale(1.1); }

#modal-title { margin: 0 0 5px; font-size: 1.6rem; color: white; }
.modal-subtitle { color: var(--text-muted); margin: 0 0 15px; font-size: 0.95rem; }

.id-num { 
    font-size: 1.8rem; font-weight: 900; color: #60a5fa; 
    margin: 10px 0; padding: 15px; 
    background: rgba(15,23,42,0.6);
    border: 2px dashed #3b82f6; 
    border-radius: 12px;
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: text;
    letter-spacing: 2px;
}

.success-msg { color: var(--success); font-size: 0.9rem; font-weight: bold; margin-top: 10px; }

.copy-trigger {
    background: var(--primary); color: white; border: none;
    padding: 10px 20px; border-radius: 8px; font-size: 0.9rem;
    cursor: pointer; margin-top: 15px; font-weight: bold;
    transition: 0.2s;
}
.copy-trigger:active { transform: scale(0.95); }

.modal-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 25px 0; }

.btn-etsy-modal { 
    background: var(--etsy); color: white; padding: 14px; 
    text-decoration: none; display: block; border-radius: 10px; 
    font-weight: bold; transition: 0.2s;
}
.btn-etsy-modal:hover { filter: brightness(1.1); }

/* Wichtiger Hinweis über PayPal - Besser hervorgehoben */
.paypal-hint { 
    font-size: 0.9rem; 
    color: #e2e8f0; 
    margin-bottom: 20px; 
    line-height: 1.5; 
    background: rgba(59, 130, 246, 0.15); 
    padding: 12px 15px; 
    border-radius: 8px; 
    border-left: 4px solid #3b82f6;
    text-align: left;
}

/* FIX: Schwarze Schrift auf weißem Grund für den PayPal-Bereich erzwingen */
.paypal-box { 
    min-height: 150px; 
    background: #ffffff; 
    padding: 15px; 
    border-radius: 12px; 
    color: #0f172a; 
}
.paypal-box * {
    color: #0f172a !important;
}

.back-link { margin-top: 25px; font-size: 0.9rem; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
.back-link:hover { color: white; }

/* --- Toast Notification --- */
.toast {
    visibility: hidden; min-width: 250px; background: #3b82f6; color: white;
    text-align: center; border-radius: 10px; padding: 16px; font-weight: bold;
    position: fixed; z-index: 2000; left: 50%; bottom: 30px;
    transform: translateX(-50%); box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    opacity: 0; transition: opacity 0.4s, bottom 0.4s, visibility 0.4s;
}
.toast.show { visibility: visible; opacity: 1; bottom: 50px; }

/* --- Responsive --- */
@media (max-width: 768px) { 
    .header-box { padding-top: 10px; }
    .back-home-btn { position: relative; left: auto; top: auto; transform: none; margin-bottom: 5px; }
    .toolbar { gap: 8px; padding: 8px; }
    .tool-group { padding: 3px; }
    .btn { padding: 8px 10px; font-size: 0.85rem; }
    .canvas-container-outer { padding: 30px; border-radius: 12px; } 
    .ruler-h { top: 10px; left: 30px; right: 30px; } 
    .ruler-v { left: 10px; top: 30px; bottom: 30px; }
}