/* Hauptfenster */
.htmlbox-window {
    position: fixed;
    background: #fff;
    border: 2px solid #444;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    user-select: none;
    color: #000;
    
    
    /* zentriert positionieren - nicht mit dragmove nutzbar. 
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%); */
    
}
/* alle elemente unterhalb in htmlbox-window erben color. */
.htmlbox-window * {
    color: inherit;
}


/* Header */
.htmlbox-header {
    background: #333;
    color: #fff;
    padding: 6px 10px;
    cursor: move;
    font-weight: bold;
    text-align: left; /* <- WICHTIG */
}
/* wenn icon benötigt. */
.htmlbox-header {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Inhalt (alte Version mit calc, funktioniert am saubersten!) */
.htmlbox-content {
    padding: 10px;
    overflow: auto;
    height: calc(100% - 90px); /* <- alte, funktionierende Berechnung */
}

/* Buttons */
.htmlbox-buttons {
    padding: 10px;
    /* text-align: right; */
}

/* iframe */
.htmlbox-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* DragShield – verhindert iframe-Eventverlust beim Ziehen */
.htmlbox-dragshield {
    position: absolute;
    inset: 0;
    z-index: 9999;
    background: transparent;
    pointer-events: none; /* wird beim Drag auf auto gesetzt */
    display: none;
}

/* Modal Overlay */
.htmlbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
}


/* mahjong colored */
.htmlbox-content {
	color: #fff;
	font-weight: bold;
	font-size: 20px;

	text-shadow: -1px -1px 0 #111,
		1px -1px 0 #111,
		-1px 1px 0 #111,
		1px 1px 0 #111;
	box-shadow: 0 2px 8px rgba(0,0,0,0.5) inset,
		0 1px rgba(255,255,255,0.3),
		0 3px rgba(255,255,255,0.2),
		0 5px 10px rgba(255,255,255,0.25),
		0 -15px 30px rgba(0,0,0,0.3);

    border-radius:5px;

	background-color: rgba(0,0,0,.6);
	background-color: #333;
	
	margin: 0;
	padding: 0;
	border-radius:0;

}
.htmlbox-header {
	background: transparent;
}
.htmlbox-window {
	/* text */
	font-family:'Wonton', 'Times New Roman', 'Arial';
	font-size:1.10em;
	font-weight:bold;
	color:#fff;
	text-align:center;
	text-shadow:
		-1px -1px 0 #000, 
        1px -1px 0 #000,
        -1px 1px 0 #000, 
        1px 1px 0 #000;
	/* rahmen */
	border: 1px solid rgba(0,0,0,.5);
	background-color: #e7e7e7;
	box-shadow: 0 2px 8px rgba(0,0,0,0.5),
        		inset 0 1px rgba(255,255,255,0.3),
        		inset 0 10px rgba(255,255,255,0.2),
        		inset 0 10px 20px rgba(255,255,255,0.25),
        		inset 0 -15px 30px rgba(0,0,0,0.3);
	text-decoration: none;
	border-radius: 24px;
}
.htmlbox-footer {
	background: transparent;
}
    
/* buttons für die htmlbox definieren */

.htmlbox-buttons > button {
	font-family:'Wonton', 'Times New Roman', 'Arial';
	font-size:1.10em;
	color:#f2f2f2;
	text-shadow:
        -1px -1px 0 #000, 
        1px -1px 0 #000, 
        -1px 1px 0 #000, 
        1px 1px 0 #000;
	border: 1px solid rgba(127,127,127);
	border-bottom: 3px solid rgba(0,0,0,0.5);
	border-radius: 3px;
	background: rgba(255,255,255,0.8);
    box-shadow:
        0 2px 8px rgba(0,0,0,0.5),
        inset 0 1px rgba(255,255,255,0.3),
        inset 0 10px rgba(255,255,255,0.2),
        inset 0 10px 20px rgba(255,255,255,0.25),
        inset 0 -15px 30px rgba(0,0,0,0.3);
	border-radius:8px;
	
	margin-left:1em;
	width: 120px;
}
.htmlbox-buttons > button.pressed,
.htmlbox-buttons > button:active {
	transform: translateY(2px);
    box-shadow: 0 -30px 50px rgba(0,0,0,.1) inset,
                0 0 6px #666 inset;
    border: 1px solid #222;
    background:rgba(255,255,255,1);  
	box-shadow: 0px 0px 10px #fff;
}
.htmlbox-buttons > button:hover {
    background:rgba(255, 255, 255, 1);
}
.htmlbox-buttons > button.disabled,
.htmlbox-buttons > button[disabled] {
    background:rgba(255, 255, 255, 0.3);
    opacity: .5;
    box-shadow: 0;
    border:1px solid #222;
}


/* moderne version */

/* Moderne runde UI-Buttons */
.modern-btn {
    font-family: 'Wonton', 'Arial', sans-serif;
    font-size: 1.1em;
    padding: 10px 18px;
    border-radius: 12px;

    background: linear-gradient(145deg, #ffffff, #dcdcdc);
    border: 1px solid rgba(0,0,0,0.2);

    color: #222;
    text-shadow: none;

    box-shadow:
        0 4px 8px rgba(0,0,0,0.25),
        inset 0 1px 2px rgba(255,255,255,0.6);

    cursor: pointer;
    transition: all 0.15s ease;
}


/* Hover */
.modern-btn:hover {
    background: linear-gradient(145deg, #ffffff, #e8e8e8);
    box-shadow:
        0 6px 12px rgba(0,0,0,0.3),
        inset 0 1px 2px rgba(255,255,255,0.7);
}
/* Active (gedrückt) */
.modern-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(0,0,0,0.3);
}
/* Disabled */
.modern-btn.disabled,
.modern-btn[disabled] {
    opacity: 0.5;
    cursor: default;
    transform: none;
    box-shadow: none;
}

/* soft variante */
.modern-btn.soft {
    background: #e6e6e6;
    border-radius: 12px;
    box-shadow:
        6px 6px 12px #b8b8b8,
        -6px -6px 12px #ffffff;
}

.modern-btn.soft:active {
    box-shadow:
        inset 6px 6px 12px #b8b8b8,
        inset -6px -6px 12px #ffffff;
    transform: translateY(2px);
}

/* glas */
.modern-btn.glass {
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}


/* material style */
.modern-btn.flat {
    background: #4a90e2;
    color: #fff;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.modern-btn.flat:hover {
    background: #5aa0f2;
}

.modern-btn.flat:active {
    background: #3a80d2;
    transform: translateY(2px);
}
