/* Global Modal Styles */
.dm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.dm-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.dm-modal {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--background-color, #1a1a1a);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--dm-border-color, rgba(255, 255, 255, 0.1));
}

.dm-modal-overlay.show .dm-modal {
    transform: scale(1) translateY(0);
}

.dm-modal-header {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--dm-border-color, rgba(255, 255, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dm-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--color, #fff);
}

.dm-modal-close {
    border: none;
    color: var(--sub-color, #999);
    font-size: 24px;
    cursor: pointer;
    padding: 0 !important;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
    background: transparent;
    /* Reset any button styles */
    -webkit-appearance: none;
    appearance: none;
    font-weight: normal;
    text-align: center;
    outline: none;
}

.dm-modal-close svg {
    width: 24px;
    height: 24px;
    display: block;
}

.dm-modal-close:hover {
    color: var(--color, #fff);
}

.dm-modal-close:focus-visible {
    outline: 2px solid var(--e-global-color-primary, #EC1567);
    outline-offset: 2px;
}

.dm-modal-body, .dm-modal-body p {
    padding: 0;
    color: var(--sub-color, #fff);
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
}

.dm-modal-footer {
    padding-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.dm-modal-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    min-width: 80px;
}

.dm-modal-btn-primary {
    background: var(--e-global-color-primary, #EC1567);
    color: #fff;
}

.dm-modal-btn-primary:hover {
    background: var(--btn-hover, #d81b60);
    opacity: 0.9;
}

.dm-modal-btn-secondary {
    background: var(--hover-background, rgba(255, 255, 255, 0.1));
    color: var(--color, #fff);
    border: 1px solid var(--dm-border-color, rgba(255, 255, 255, 0.2));
}

.dm-modal-btn-secondary:hover {
    background: var(--hover-background, rgba(255, 255, 255, 0.15));
}

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

/* Light mode overrides */
.light .dm-modal {
    background: var(--background-color, #fff);
    border-color: var(--dm-border-color, #e0e0e0);
}

.light .dm-modal-title {
    color: var(--color, #333);
}

.light .dm-modal-body {
    color: var(--color, #333);
}

.light .dm-modal-close {
    color: var(--sub-color, #666);
}

/* Icon styles */
.dm-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.dm-modal-icon svg {
    width: 32px;
    height: 32px;
}

.dm-modal-icon.warning {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.dm-modal-icon.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.dm-modal-icon.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.dm-modal-icon.info {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

/* Responsive */
@media (max-width: 768px) {
    .dm-modal {
        width: 90%;
        max-width: none;
    }
}

