/* Gloomhaven Campaign Tracker - Global Styles */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #e8d5a3;
}

/* Map Container */
.map-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border: 2px solid #4a3a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Map Marker - Basis */
.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 10;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
}

.map-marker-icon {
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    rotate: -45deg;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    border: 2px solid transparent;
}

/* Completed - Grün */
.map-marker--completed .map-marker-icon {
    background-color: #4caf50;
    border-color: #2e7d32;
}

.map-marker--completed:hover .map-marker-icon {
    background-color: #66bb6a;
}

/* Available - Grau */
.map-marker--available {
    cursor: default;
}

.map-marker--available .map-marker-icon {
    background-color: #757575;
    border-color: #424242;
}

.map-marker--available:hover {
    transform: translate(-50%, -50%);
}

/* Gesperrter Marker */
.map-marker--locked {
    cursor: not-allowed;
}

.map-marker--locked .map-marker-icon {
    background-color: #e53935;
    border-color: #b71c1c;
}

.map-marker--locked:hover {
    transform: translate(-50%, -50%);
}

/* Szenarionummer im Pin */
.map-marker-number {
    transform: rotate(45deg);
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    user-select: none;
}

/* Adventure Drawer */
.adventure-drawer-content {
    padding: 16px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
}

/* Timeline */
.timeline-card {
    border-left: 3px solid #D4A017;
    transition: border-color 0.2s ease;
}

.timeline-card:hover {
    border-left-color: #F0B820;
}

/* Markdown Rendering */
.mud-markdown-body h1,
.mud-markdown-body h2,
.mud-markdown-body h3 {
    color: #D4A017;
    font-family: 'Roboto', sans-serif;
}

.mud-markdown-body blockquote {
    border-left: 3px solid #A0522D;
    padding-left: 12px;
    color: #c0a878;
    font-style: italic;
}

/* Error UI */
#blazor-error-ui {
    background: #A0522D;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #e8d5a3;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Portrait-Hinweis auf Mobile */
.portrait-warning {
    display: none;
}

@media (orientation: portrait) and (max-width: 960px) {
    .portrait-warning {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 9999;
        background-color: #0d0d0d;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        padding: 32px;
        text-align: center;
    }
}

.portrait-warning__icon {
    font-size: 64px;
    animation: rotate-hint 2s ease-in-out infinite;
}

@keyframes rotate-hint {
    0%   { transform: rotate(0deg); }
    40%  { transform: rotate(90deg); }
    60%  { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}
