/* カスタム通知システム */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #667eea;
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.warning {
    border-left-color: #f59e0b;
}

.notification.info {
    border-left-color: #3b82f6;
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon svg {
    width: 100%;
    height: 100%;
}

.notification.success .notification-icon {
    color: #10b981;
}

.notification.error .notification-icon {
    color: #ef4444;
}

.notification.warning .notification-icon {
    color: #f59e0b;
}

.notification.info .notification-icon {
    color: #3b82f6;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.notification-message {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.notification-close {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    padding: 0;
}

.notification-close:hover {
    background: #f5f5f5;
    color: #333;
}

.notification-close svg {
    width: 18px;
    height: 18px;
}

.notification.fade-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* カスタム確認ダイアログ - 再デザイン（要素設定モーダル z-index:99999 より上に表示） */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.confirm-dialog-overlay.show {
    opacity: 1;
}

.confirm-dialog {
    background: var(--color-surface, #fff);
    border-radius: var(--radius-lg, 16px);
    border: 1px solid var(--color-border, #e8e8ef);
    width: 100%;
    max-width: min(520px, 92vw);
    box-shadow: var(--shadow-soft, 0 6px 20px rgba(22, 33, 74, 0.12));
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.confirm-dialog-overlay.show .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-dialog-header {
    padding: 24px 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--color-border, #e8e8ef);
}

.confirm-dialog-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--gradient-primary, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.confirm-dialog-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.confirm-dialog-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text, #1a1a2e);
    margin: 0;
    line-height: 1.4;
}

.confirm-dialog-body {
    padding: 24px;
    text-align: center;
}

.confirm-dialog-message {
    font-size: 15px;
    color: var(--color-text-muted, #5c5c6f);
    line-height: 1.7;
    margin: 0;
    white-space: pre-line;
}

.confirm-dialog-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px 24px;
    border-top: 1px solid var(--color-border, #e8e8ef);
    background: var(--color-surface-strong, #f6f7fb);
}

.confirm-dialog-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.confirm-dialog-btn-cancel {
    background: var(--color-surface-strong, #f6f7fb);
    color: var(--color-text-muted, #5c5c6f);
    border: 2px solid var(--color-border, #e0e0e8);
}

.confirm-dialog-btn-cancel:hover {
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-text, #1a1a2e);
    border-color: rgba(var(--color-primary-rgb), 0.28);
    transform: translateY(-1px);
}

.confirm-dialog-btn-ok {
    background: var(--gradient-primary, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: white;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.confirm-dialog-btn-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.4);
}

.confirm-dialog-btn:active {
    transform: translateY(0);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: 100%;
    }
    
    .confirm-dialog {
        max-width: 100%;
    }
    
    .confirm-dialog-actions {
        flex-direction: column;
    }
    
    .confirm-dialog-btn {
        width: 100%;
    }
}
