/**
 * Event Dialog and Toast Styles
 * Used by EventManager for game events like Black Friday, BSOD, etc.
 */

/* === Event Dialog Overlay === */
.event-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: event-fade-in 0.2s ease-out;
}

@keyframes event-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.event-dialog {
    min-width: 350px;
    max-width: 500px;
    animation: event-dialog-in 0.2s ease-out;
}

@keyframes event-dialog-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.event-dialog .window-body {
    padding: 16px;
}

/* === Event Dialog Content === */
.event-dialog-content {
    text-align: center;
}

.event-dialog-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.event-dialog-text {
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
    white-space: pre-line;
}

/* === Event Dialog Buttons === */
.event-dialog-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.event-btn {
    min-width: 80px;
    padding: 6px 16px;
    cursor: pointer;
}

.event-btn.primary {
    font-weight: bold;
}

/* === Event Dialog Choices === */
.event-dialog-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-choice-btn {
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
}

.event-choice-btn:hover {
    background: #316ac5;
    color: white;
}

/* === Style Variants === */
.event-style-normal .event-dialog .title-bar {
    background: linear-gradient(180deg, #0054e3 0%, #0047ab 100%);
}

.event-style-warning .event-dialog .title-bar {
    background: linear-gradient(180deg, #e3a300 0%, #b38600 100%);
}

.event-style-critical .event-dialog .title-bar {
    background: linear-gradient(180deg, #e30000 0%, #ab0000 100%);
}

.event-style-success .event-dialog .title-bar {
    background: linear-gradient(180deg, #00a300 0%, #007a00 100%);
}

.event-style-critical .event-dialog {
    border-color: #ff0000;
}

.event-style-critical .event-dialog .window-body {
    background: linear-gradient(180deg, #2a1a1a 0%, #1a1a2e 100%);
    color: #ff8888;
}

/* === Toast Container === */
#toast-container {
    position: fixed;
    top: 60px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10001;
    pointer-events: none;
}

/* === Toast === */
.toast {
    padding: 12px 20px;
    border-radius: 4px;
    background: #333;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: auto;
    max-width: 350px;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Types */
.toast-info {
    background: #2196f3;
    border-left: 4px solid #1565c0;
}

.toast-success {
    background: #4caf50;
    border-left: 4px solid #2e7d32;
}

.toast-warning {
    background: #ff9800;
    border-left: 4px solid #e65100;
}

.toast-error {
    background: #f44336;
    border-left: 4px solid #c62828;
}

.toast-message {
    font-size: 14px;
}

/* === BSOD Overlay (for BlueScreenEvent) === */
.bsod-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0078d7;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: white;
    cursor: none;
    user-select: none;
}

.bsod-content {
    max-width: 800px;
    padding: 40px;
}

.bsod-sad {
    font-size: 120px;
    font-weight: 100;
    margin-bottom: 20px;
}

.bsod-message {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 30px;
}

.bsod-percent {
    font-size: 20px;
    margin-bottom: 40px;
}

.bsod-qr {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.qr-placeholder {
    font-family: monospace;
    font-size: 12px;
    line-height: 1;
    background: white;
    color: black;
    padding: 8px;
}

.bsod-info {
    font-size: 14px;
    line-height: 1.6;
}

.bsod-info p {
    margin: 5px 0;
}

.bsod-stopcode {
    margin-top: 15px !important;
}

.bsod-fade {
    animation: bsod-flicker 0.5s ease-out forwards;
}

@keyframes bsod-flicker {
    0% { opacity: 1; }
    20% { opacity: 0; }
    40% { opacity: 0.8; }
    60% { opacity: 0; }
    80% { opacity: 0.5; }
    100% { opacity: 0; }
}

/* Retro BSOD styles for earlier eras */
.bsod-win95 {
    background-color: #000080;
    font-family: 'Courier New', monospace;
}

.bsod-win95 .bsod-content {
    text-align: center;
}

.bsod-winxp {
    background-color: #000080;
    font-family: 'Lucida Console', monospace;
}

.bsod-winxp .bsod-content {
    font-size: 14px;
    line-height: 1.3;
}
