/* Modal Manager Styles */

/* Toast Container */
.toast-container {
    position: fixed;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Toast Positions */
.toast-top-right {
    top: 20px;
    right: 20px;
}

.toast-top-left {
    top: 20px;
    left: 20px;
}

.toast-bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

.toast-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast {
    background: #1a1a1a;
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-left: 4px solid #4a90e2;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: all;
}

/* Toast animations based on container position */
.toast-top-right .toast,
.toast-bottom-right .toast {
    transform: translateX(400px);
}

.toast-top-left .toast,
.toast-bottom-left .toast {
    transform: translateX(-400px);
}

.toast-top-center .toast,
.toast-bottom-center .toast {
    transform: translateY(-50px);
}

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

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #fff;
}

/* Toast Types */
.toast-info {
    border-left-color: #4a90e2;
}

.toast-success {
    border-left-color: #4ae290;
}

.toast-warning {
    border-left-color: #e2d44a;
}

.toast-error {
    border-left-color: #e24a4a;
}

/* Modal Container */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    pointer-events: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.modal-show {
    opacity: 1;
}

.modal-show .modal-box {
    transform: scale(1);
    opacity: 1;
}

.modal-box {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    max-width: 1000px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #c0a062;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    color: #fff;
}

.modal-content p {
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.modal-content p:last-child {
    margin-bottom: 0;
}

.modal-input {
    width: 100%;
    padding: 10px;
    background: #0a0a0a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 10px;
}

.modal-input:focus {
    outline: none;
    border-color: #c0a062;
}

.modal-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.modal-choice-btn {
    padding: 12px 16px;
    background: #0a0a0a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-align: left;
}

.modal-choice-btn:hover {
    background: #252525;
    border-color: #c0a062;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: #c0a062;
    color: #000;
}

.modal-btn-primary:hover {
    background: #d4b577;
}

.modal-btn-secondary {
    background: #333;
    color: #fff;
}

.modal-btn-secondary:hover {
    background: #444;
}

.modal-btn-danger {
    background: #e24a4a;
    color: #fff;
}

.modal-btn-danger:hover {
    background: #f55;
}

.modal-btn-success {
    background: #4ae290;
    color: #000;
}

.modal-btn-success:hover {
    background: #5ff5a5;
}

.modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-btn:disabled:hover {
    background-color: inherit;
}

/* Responsive */
@media (max-width: 600px) {
    .toast-top-right,
    .toast-top-left {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .toast-bottom-right,
    .toast-bottom-left {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .toast-top-center {
        left: 10px;
        right: 10px;
        top: 10px;
        transform: none;
    }
    
    .toast-bottom-center {
        left: 10px;
        right: 10px;
        bottom: 10px;
        transform: none;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
    
    .modal-box {
        max-width: none;
    }
}

/* Light Mode Support */
html:not(.dark) .modal-box {
    background-color: #ffffff;
    border-color: #e5e7eb;
    color: #111827;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html:not(.dark) .modal-header {
    border-bottom-color: #e5e7eb;
}

html:not(.dark) .modal-header h3 {
    color: #111827;
}

html:not(.dark) .modal-content {
    color: #374151;
}

html:not(.dark) .modal-close {
    color: #9ca3af;
}

html:not(.dark) .modal-close:hover {
    color: #111827;
}

html:not(.dark) .modal-input {
    background: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

html:not(.dark) .modal-btn-secondary {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

html:not(.dark) .modal-btn-secondary:hover {
    background: #e5e7eb;
}
